mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-06-05 09:58:16 +08:00
fix(解决由于flutter 版本问题导致的报错):
This commit is contained in:
21
lib/resources/shared_preferences_keys.dart
Normal file
21
lib/resources/shared_preferences_keys.dart
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Created with Android Studio.
|
||||
* User: 三帆
|
||||
* Date: 31/01/2019
|
||||
* Time: 18:13
|
||||
* email: sanfan.hx@alibaba-inc.com
|
||||
* tartget: xxx
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class Demo extends StatefulWidget {
|
||||
_Demo createState() => _Demo();
|
||||
}
|
||||
|
||||
class _Demo extends State<Demo> {
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return Container();
|
||||
}
|
||||
}
|
0
lib/utils/shared_preferences.dart
Normal file
0
lib/utils/shared_preferences.dart
Normal file
@ -32,7 +32,7 @@ class Demo extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _Demo extends State<Demo> {
|
||||
Color c = CupertinoColors.darkBackgroundGray;
|
||||
Color c = CupertinoColors.activeBlue;
|
||||
Widget build(BuildContext context) {
|
||||
return WidgetDemo(
|
||||
title: 'SliderThemeData',
|
||||
|
@ -139,7 +139,7 @@ class _CupertinoAppFullDefault extends State {
|
||||
middle: Text('这里是标题', style: TextStyle(color: Colors.white)),
|
||||
),
|
||||
child: Center(child: Text('这里是内容', style: TextStyle(color: Colors.black))),
|
||||
backgroundColor: CupertinoColors.extraLightBackgroundGray,
|
||||
backgroundColor: CupertinoColors.inactiveGray,
|
||||
);
|
||||
}
|
||||
);
|
||||
|
@ -34,7 +34,7 @@ class _CupertinoButtonFullDefault extends State {
|
||||
print('on Pressed!');
|
||||
},
|
||||
pressedOpacity:0.5,// 按下后的按钮不透明度
|
||||
color:CupertinoColors.darkBackgroundGray,
|
||||
color:CupertinoColors.inactiveGray,
|
||||
child: new Text('CupertinoButton'),
|
||||
);
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ class _CupertinoNavigationBarFullDefault extends State {
|
||||
middle: Text('Title'),// 放置在导航栏的中间。通常是标题或分段控件
|
||||
trailing: Icon(CupertinoIcons.share),// 放置在导航栏的末尾。通常在页面上执行其他操作,例如搜索或编辑功能
|
||||
actionsForegroundColor:CupertinoColors.white,// 用于 导航栏中前导和尾随小部件的文本和图标的默认颜色。
|
||||
backgroundColor:CupertinoColors.activeOrange,// 导航栏的背景颜色。如果它包含透明度,标签栏将自动对其背后的内容产生模糊效果
|
||||
backgroundColor:CupertinoColors.activeGreen,// 导航栏的背景颜色。如果它包含透明度,标签栏将自动对其背后的内容产生模糊效果
|
||||
border:Border( // 边框样式
|
||||
bottom: BorderSide(color: CupertinoColors.inactiveGray, width: 1.0),
|
||||
),
|
||||
|
@ -34,7 +34,7 @@ class _CupertinoPageScaffoldFullDefault extends State {
|
||||
|
||||
Widget navigationBar(BuildContext context) {
|
||||
return CupertinoPageScaffold( // 进入程序后显示的第一个页面,传入的是一个Widget,但实际上这个Widget需要包裹一个Scaffold
|
||||
backgroundColor:CupertinoColors.extraLightBackgroundGray,// 整个脚手架下面的 widget 的颜色
|
||||
backgroundColor:CupertinoColors.inactiveGray,// 整个脚手架下面的 widget 的颜色
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
leading: Icon(CupertinoIcons.back),// 放置在导航栏的开头。通常是正常页面的后退按钮或完整页面对话框的取消按钮
|
||||
middle: Text('这里是标题'),// 放置在导航栏的中间。通常是标题或分段控件
|
||||
|
@ -47,7 +47,7 @@ class _CupertinoPickerDemoState extends State<CupertinoPickerDemo> {
|
||||
Widget _buildMenu(List<Widget> children) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: CupertinoTheme.of(context).scaffoldBackgroundColor,
|
||||
color:CupertinoColors.inactiveGray,
|
||||
border: const Border(
|
||||
top: BorderSide(color: Color(0xFFBCBBC1), width: 0.0),
|
||||
bottom: BorderSide(color: Color(0xFFBCBBC1), width: 0.0),
|
||||
@ -265,12 +265,10 @@ class _CupertinoPickerDemoState extends State<CupertinoPickerDemo> {
|
||||
// previousPageTitle: 'Cupertino'
|
||||
// ),
|
||||
child: DefaultTextStyle(
|
||||
style: CupertinoTheme.of(context).textTheme.textStyle,
|
||||
style: TextStyle(),
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: CupertinoTheme.of(context).brightness == Brightness.light
|
||||
? CupertinoColors.extraLightBackgroundGray
|
||||
: CupertinoColors.darkBackgroundGray,
|
||||
color: CupertinoColors.inactiveGray
|
||||
),
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
|
Reference in New Issue
Block a user