Commit ad253d64 authored by 艾娇平's avatar 艾娇平

意见页面

parent fd09a8a9
// Copyright 2019 All rights reserved.
// Authors: Mikasa Authors.
import 'dart:ui' show Color;
import 'package:flutter/painting.dart';
// 关于颜色的定义
// Color(0xFF323232);
// FF 表示透明度 323232 表示RGB颜色值
class ALColors {
ALColors._();
static const Color Color323232 = Color(0xFF323232);
static const Color Color464646 = Color(0xFF464646);
static const Color Color999999 = Color(0xFF999999);
static const Color ColorFFFFFF = Color(0xFFffffff);
static const Color Color8E8E8E = Color(0xFF8e8e8e);
static const Color ColorC4C4C4 = Color(0xFFc4c4c4);
static const Color ColorF8F8F8 = Color(0xFFf8f8f8);
static const Color ColorE4E4E4 = Color(0xFFe4e4e4);
static const Color ColorF4F3F8 = Color(0xFFf4f3f8);
static const Color Color282828 = Color(0xFF282828);
static const Color ColorE5E5E5 = Color(0xFFe5e5e5);
}
\ No newline at end of file
//
// ALCommon
//
// gmalpha_flutter
// Created by lxrent on 2019/2/19.
// Copyright © 2019 Gengmei. All rights reserved.
//
import 'package:flutter/material.dart';
import 'ALColors.dart';
class ALAlphaButton extends FlatButton {
// factory ALAlphaButton
/// Create a simple text button.
const ALAlphaButton({
Key key,
@required VoidCallback onPressed,
ValueChanged<bool> onHighlightChanged,
ButtonTextTheme textTheme,
Color textColor,
Color disabledTextColor,
Color color,
Color disabledColor,
Color highlightColor,
Color splashColor,
Brightness colorBrightness,
EdgeInsetsGeometry padding,
ShapeBorder shape,
Clip clipBehavior = Clip.none,
MaterialTapTargetSize materialTapTargetSize,
@required Widget child,
}) : super(
key: key,
onPressed: onPressed,
onHighlightChanged: onHighlightChanged,
textTheme: textTheme,
textColor: textColor,
disabledTextColor: disabledTextColor,
color: color,
disabledColor: disabledColor,
highlightColor: highlightColor,
splashColor: splashColor,
colorBrightness: colorBrightness,
padding: padding,
shape: shape,
clipBehavior: clipBehavior,
materialTapTargetSize: materialTapTargetSize,
child: child,
);
@override
Widget build(BuildContext context) {
// TODO: implement build
return FlatButton(
onPressed: onPressed,
child: child,
color: ALColors.Color323232,
shape: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(0)),
borderSide: BorderSide(color: ALColors.Color323232)),
);
}
}
//
// ALDevice
//
// gm_alpha_flutter
// Created by lxrent on 2019/1/30.
// Copyright © 2019 Gengmei. All rights reserved.
//
import 'dart:ui';
class ALDevice {
ALDevice._();
static bool debug = !const bool.fromEnvironment("dart.vm.product");
static double width = window.physicalSize.width;
static double height = window.physicalSize.height;
}
\ No newline at end of file
import 'package:flutter/material.dart';
import 'battery.dart';
import 'dart:ui';
import 'opinion.dart';
import 'package:flutter/rendering.dart';
void main() {
debugPaintSizeEnabled = false; //打开视觉调试开关
return runApp(_widgetForRoute(window.defaultRouteName));
}
class ALRoute {
ALRoute._();
static const String Opinion = 'opinion';
}
// 设置Native 跳转入口
Widget _widgetForRoute(String route) {
switch (route) {
case 'myApp':
return new MyApp();
case ALRoute.Opinion:
return new Opinion();
default:
return Center(
child: Text('Unknown route: $route', textDirection: TextDirection.ltr),
);
}
}
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
......@@ -9,17 +35,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or press Run > Flutter Hot Reload in a Flutter IDE). Notice that the
// counter didn't reset back to zero; the application is not restarted.
primarySwatch: Colors.blue,
),
theme: ThemeData.light(),
home: MyHomePage(title: 'Flutter Demo Home Page'),
routes: {
"/channeltest": batteryChannelPage,
......@@ -35,15 +51,6 @@ class MyApp extends StatelessWidget {
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
@override
......@@ -82,20 +89,7 @@ class _MyHomePageState extends State<MyHomePage> {
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Column(
// Column is also layout widget. It takes a list of children and
// arranges them vertically. By default, it sizes itself to fit its
// children horizontally, and tries to be as tall as its parent.
//
// Invoke "debug painting" (press "p" in the console, choose the
// "Toggle Debug Paint" action from the Flutter Inspector in Android
// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
// to see the wireframe for each widget.
//
// Column has various properties to control how it sizes itself and
// how it positions its children. Here we use mainAxisAlignment to
// center the children vertically; the main axis here is the vertical
// axis because Columns are vertical (the cross axis would be
// horizontal).
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
......
//
// opinion
//
// gmalpha_flutter
// Created by Mikasa on 2019/2/19.
// Copyright © 2019 Gengmei. All rights reserved.
//
import 'package:flutter/material.dart';
import 'macros/ALColors.dart';
import 'macros/ALDevice.dart';
//ALColors.ColorFFFFFF
class Opinion extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
color: ALColors.ColorFFFFFF,
theme: ThemeData.light(),
home: OpinionPage(title: '意见和建议1111111'),
// routes: {
// "/channeltest": batteryChannelPage,
// },
);
}
}
class OpinionPage extends StatefulWidget {
OpinionPage({Key key, this.title}) : super(key: key);
final String title;
@override
_OpinionPageState createState() => _OpinionPageState();
}
class _OpinionPageState extends State<OpinionPage> {
TextEditingController opinionCtrl = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
// appBar: AppBar(
// title: Text('Home'),
// ),
appBar: PreferredSize(
child: Container(
alignment: Alignment.center,
child: Text(
'意见与反馈',
style: TextStyle(color: ALColors.Color323232, fontSize: 18),
),
),
preferredSize: Size(320, 64)),
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 30, top: 42, right: 30, bottom: 0),
height: 215,
width: ALDevice.width,
child: TextField(
controller: opinionCtrl,
decoration: InputDecoration(
contentPadding: EdgeInsets.all(10),
border: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(0)),
borderSide:BorderSide(color: ALColors.ColorC4C4C4)
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(0)),
borderSide:BorderSide(color: ALColors.ColorC4C4C4)
),
hintText: '意见与建议',
hintStyle: TextStyle(
color: ALColors.ColorC4C4C4,
fontSize: 14,),
labelStyle: TextStyle(color: ALColors.Color323232,fontSize: 19),
),
),
),
OutlineButton(
child: Text('有阴影'),
),
FlatButton(
shape: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(0)),
borderSide:BorderSide(color: ALColors.Color323232)
),
child: Text('提交2222'),
color: ALColors.ColorFFFFFF,
onPressed: () {
Navigator.pushNamed(context, "/channeltest");
},
)
],
),
),
);
}
}
//
//class MyNarBar extends PreferredSizeWidget {
// @override
//}
......@@ -5,35 +5,35 @@ packages:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.8"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.4"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.14.11"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.2"
flutter:
......@@ -50,28 +50,28 @@ packages:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.3+1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.6"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.2"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
sky_engine:
......@@ -83,56 +83,56 @@ packages:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.9.3"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.8"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.4"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.1"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.6"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.8"
sdks:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment