@ -7,9 +7,11 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
084A20882202E4FD00428FF5 /* flutter go.png in Resources */ = {isa = PBXBuildFile; fileRef = 084A20872202E4FD00428FF5 /* flutter go.png */; };
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
333E5DAE7FC10AC69FEC26C0 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDA792F029EDD7A11295D192 /* libPods-Runner.a */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
|
||||
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
|
||||
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
|
||||
@ -37,9 +39,11 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
084A20872202E4FD00428FF5 /* flutter go.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "flutter go.png"; sourceTree = "<group>"; };
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
|
||||
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
@ -90,6 +94,7 @@
|
||||
children = (
|
||||
3B80C3931E831B6300D905FE /* App.framework */,
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
|
||||
9740EEBA1CF902C7004384FC /* Flutter.framework */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
@ -101,6 +106,7 @@
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
084A20872202E4FD00428FF5 /* flutter go.png */,
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
@ -206,6 +212,8 @@
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
|
||||
084A20882202E4FD00428FF5 /* flutter go.png in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
|
@ -7,6 +7,7 @@
|
||||
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
[GeneratedPluginRegistrant registerWithRegistry:self];
|
||||
// Override point for customization after application launch.
|
||||
[NSThread sleepForTimeInterval:2];
|
||||
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
}
|
||||
|
||||
|
@ -2,17 +2,17 @@
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"filename" : "flutter go.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"filename" : "flutter go-1.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"filename" : "flutter go-2.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
@ -20,4 +20,4 @@
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/flutter go-1.png
vendored
Normal file
After Width: | Height: | Size: 197 KiB |
BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/flutter go-2.png
vendored
Normal file
After Width: | Height: | Size: 197 KiB |
BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/flutter go.png
vendored
Normal file
After Width: | Height: | Size: 197 KiB |
@ -1,8 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
@ -14,24 +18,34 @@
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1080" height="1920"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1920" id="YT6-bb-oIb"/>
|
||||
<constraint firstAttribute="width" constant="1080" id="n6M-3x-zje"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
<constraint firstAttribute="bottom" secondItem="YRO-k0-Ey4" secondAttribute="bottom" id="T5g-9A-c9v"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="eyW-WF-YgD"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="veX-UW-bF2"/>
|
||||
<constraint firstAttribute="trailing" secondItem="YRO-k0-Ey4" secondAttribute="trailing" id="yhF-ag-fuv"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
<point key="canvasLocation" x="84.799999999999997" y="337.33133433283359"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
<image name="LaunchImage" width="1080" height="1920"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
BIN
ios/flutter go.png
Normal file
After Width: | Height: | Size: 197 KiB |
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
@ -19,10 +19,10 @@ class _Demo extends State<SnackBarActionDemo> {
|
||||
return Center(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
final snackBar = SnackBar(
|
||||
content: Text('这是一个SnackBar, 右侧有SnackBarAction, 3秒后消失'),
|
||||
new RaisedButton(
|
||||
onPressed: () {
|
||||
final snackBar = new SnackBar(
|
||||
content: new Text('这是一个SnackBar, 右侧有SnackBarAction, 3秒后消失'),
|
||||
backgroundColor:Color(0xffc91b3a),
|
||||
action: SnackBarAction( // 提示信息上添加一个撤消的按钮
|
||||
textColor:Colors.white,
|
||||
@ -39,10 +39,10 @@ class _Demo extends State<SnackBarActionDemo> {
|
||||
|
||||
child: Text('点我显示有action的SnackBar'),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
final snackBar = SnackBar(
|
||||
content: Text('右侧无SnackBarAction, 3秒后消失'),
|
||||
new RaisedButton(
|
||||
onPressed: () async {
|
||||
final snackBar = new SnackBar(
|
||||
content: new Text('右侧无SnackBarAction, 3秒后消失'),
|
||||
backgroundColor:Color(0xffc91b3a),
|
||||
duration:Duration(seconds: 3),// 持续时间
|
||||
//animation,
|
||||
|
@ -11,28 +11,19 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_go/components/widget_demo.dart';
|
||||
import 'demo.dart';
|
||||
const content1 = """
|
||||
# Radio
|
||||
### **简介**
|
||||
> material design 风格的单选按钮
|
||||
|
||||
Radio widget 代表表单中的单选按钮, 当groupValue = value时代表组件被选中。
|
||||
|
||||
在表单中, 单选按钮是表示一组互斥选项按钮中的一个。当一个按钮被选中,之前选中的按钮就变为非选中的。
|
||||
|
||||
# 示例显示
|
||||
""";
|
||||
|
||||
const content2 = """
|
||||
# 基本用法
|
||||
|
||||
```
|
||||
Radio(
|
||||
value: value,
|
||||
groupValue: groupValue, //当value和groupValue一致的时候则选中
|
||||
onChanged: (T){
|
||||
onChange(T);
|
||||
}
|
||||
|
||||
````
|
||||
### **基本用法**
|
||||
以下是Radio的属性主产明
|
||||
- activeColor → Color - 激活时的颜色。
|
||||
- groupValue → T - 选择组的值。
|
||||
- onChanged → ValueChanged - 改变时触发。
|
||||
- value → T - 单选的值。
|
||||
""";
|
||||
class Demo extends StatefulWidget {
|
||||
static const String routeName = '/element/Form/Radio/index';
|
||||
@ -45,8 +36,7 @@ class _DemoState extends State<Demo> {
|
||||
return WidgetDemo(
|
||||
contentList: [
|
||||
content1,
|
||||
RadioADemo(),
|
||||
content2
|
||||
new RadioADemo(),
|
||||
],
|
||||
title: 'Radio',
|
||||
docUrl: 'https://docs.flutter.io/flutter/material/Radio-class.html',
|
||||
|
@ -11,28 +11,15 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_go/components/widget_demo.dart';
|
||||
import 'demo.dart';
|
||||
const content1 = """
|
||||
# RadioListTile
|
||||
### **简介**
|
||||
> material design 风格的单选按钮附加文字label
|
||||
|
||||
点击文字的同时 , 将会出发 Radio的点击效果.
|
||||
|
||||
功能同 @Radio
|
||||
|
||||
# 示例显示
|
||||
""";
|
||||
|
||||
const content2 = """
|
||||
# 基本用法
|
||||
|
||||
``` dart
|
||||
RadioListTile(
|
||||
title: const Text('title'),
|
||||
value: value,
|
||||
groupValue: groupValue,
|
||||
onChanged:onChange
|
||||
)
|
||||
```
|
||||
|
||||
### **基本用法**
|
||||
Radio是单选框,和checkbox一样本身不包含状态,当groupValue = value时代表选中状态
|
||||
""";
|
||||
class Demo extends StatefulWidget {
|
||||
static const String routeName = '/element/Form/RadioListTile/index';
|
||||
@ -45,8 +32,8 @@ class _DemoState extends State<Demo> {
|
||||
return WidgetDemo(
|
||||
contentList: [
|
||||
content1,
|
||||
DemoA(),
|
||||
content2
|
||||
new DemoA()
|
||||
|
||||
],
|
||||
title: 'RadioListTile',
|
||||
docUrl: 'https://docs.flutter.io/flutter/material/RadioListTile-class.html',
|
||||
|
@ -46,6 +46,10 @@ const contentB = '''
|
||||
### **高级用法**
|
||||
> 自定义Slider 样式
|
||||
|
||||
<<<<<<< HEAD
|
||||
如果当前Slider样式 无法满足需求, 可以通过 **SliderTheme** 定制复杂样式
|
||||
|
||||
=======
|
||||
如果当前Slider样式 无法满足需求, 可以通过 ** SliderTheme ** 定制复杂样式
|
||||
|
||||
```
|
||||
@ -65,6 +69,7 @@ const contentB = '''
|
||||
)
|
||||
|
||||
```
|
||||
>>>>>>> ccb5c9e42883b23266fb95b9caf4e958d817ff48
|
||||
|
||||
### **基本实例**
|
||||
|
||||
|
@ -21,6 +21,9 @@ const contentA = '''
|
||||
|
||||
> 通过更改sliderTheme.data, 修改Slider总体样式
|
||||
|
||||
<<<<<<< HEAD
|
||||
具体属性, 请查阅: SliderThemeData.data.
|
||||
=======
|
||||
基本属性参考以下代码:
|
||||
|
||||
```
|
||||
@ -47,6 +50,7 @@ const contentA = '''
|
||||
),
|
||||
|
||||
```
|
||||
>>>>>>> ccb5c9e42883b23266fb95b9caf4e958d817ff48
|
||||
|
||||
### **基本实例**
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_go/components/widget_demo.dart';
|
||||
import 'demo.dart';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
const contentA = '''
|
||||
### **简介**
|
||||
> SliderTheme的data修饰属性 **SliderThemeData**
|
||||
@ -21,30 +21,6 @@ const contentA = '''
|
||||
|
||||
> 配合SliderTheme, 修改slider组件各个部件的样式, 参照@Slider的各组件命名, 修改各部件样式
|
||||
|
||||
构造函数如下
|
||||
````
|
||||
const SliderThemeData({
|
||||
@required Color activeTrackColor,
|
||||
@required Color inactiveTrackColor,
|
||||
@required Color disabledActiveTrackColor,
|
||||
@required Color disabledInactiveTrackColor,
|
||||
@required Color activeTickMarkColor,
|
||||
@required Color inactiveTickMarkColor,
|
||||
@required Color disabledActiveTickMarkColor,
|
||||
@required Color disabledInactiveTickMarkColor,
|
||||
@required Color thumbColor,
|
||||
@required Color disabledThumbColor,
|
||||
@required Color overlayColor,
|
||||
@required Color valueIndicatorColor,
|
||||
@required SliderComponentShape thumbShape,
|
||||
@required SliderComponentShape valueIndicatorShape,
|
||||
@required ShowValueIndicator showValueIndicator,
|
||||
@required TextStyle valueIndicatorTextStyle
|
||||
})
|
||||
|
||||
````
|
||||
|
||||
### **基本实例**
|
||||
|
||||
|
||||
''';
|
||||
@ -56,7 +32,7 @@ class Demo extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _Demo extends State<Demo> {
|
||||
|
||||
Color c = CupertinoColors.activeBlue;
|
||||
Widget build(BuildContext context) {
|
||||
return WidgetDemo(
|
||||
title: 'SliderThemeData',
|
||||
|
@ -17,22 +17,8 @@ const contentA = '''
|
||||
|
||||
|
||||
### **基本用法**
|
||||
通常用于Bool值参数的设置.
|
||||
|
||||
```
|
||||
Switch(
|
||||
value: isChecked,
|
||||
activeColor: Colors.blue, // 激活时原点颜色
|
||||
onChanged: (bool val) {
|
||||
this.setState(() {
|
||||
this.isChecked = !this.isChecked;
|
||||
});
|
||||
},
|
||||
)
|
||||
```
|
||||
|
||||
### **基本实例**
|
||||
|
||||
@SwitchDemo
|
||||
''';
|
||||
|
||||
|
||||
@ -60,18 +46,6 @@ const contentC = '''
|
||||
|
||||
''';
|
||||
|
||||
const contentD = '''
|
||||
|
||||
```
|
||||
activeTrackColor:Colors.green,
|
||||
inactiveThumbColor: Colors.black,
|
||||
inactiveThumbImage: NetworkImage('https://flutter.io/images/homepage/header-illustration.png'),
|
||||
activeThumbImage: NetworkImage(
|
||||
"https://flutter.io/images/homepage/screenshot-2.png"
|
||||
),
|
||||
inactiveTrackColor: Colors.yellow,
|
||||
```
|
||||
''';
|
||||
|
||||
class Demo extends StatefulWidget {
|
||||
static const String routeName = 'elements/Form/Switch/Switch';
|
||||
@ -83,15 +57,14 @@ class _Demo extends State<Demo> {
|
||||
Widget build(BuildContext context) {
|
||||
return WidgetDemo(
|
||||
title: 'Switch',
|
||||
codeUrl: 'elements/Form/Switch/Switch/demo.dart',
|
||||
codeUrl: '/elements/Form/Switch/Switch/demo.dart',
|
||||
contentList: [
|
||||
contentA,
|
||||
SwitchDemo(),
|
||||
contentB,
|
||||
SwitchHighDemo(),
|
||||
contentC,
|
||||
SwitchTypesDemo(),
|
||||
contentD
|
||||
SwitchTypesDemo()
|
||||
],
|
||||
docUrl: 'https://docs.flutter.io/flutter/material/Switch-class.html',
|
||||
);
|
||||
|
@ -11,33 +11,13 @@ const String intro = """
|
||||
|
||||
无论是Text或者Text.rich, 查看源代码发现. 都是由RichText构建出来
|
||||
|
||||
RichText的源码展示
|
||||
|
||||
```
|
||||
// Text 源码
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
...
|
||||
Widget result = RichText(
|
||||
...
|
||||
|
||||
style: effectiveTextStyle,
|
||||
text: data,
|
||||
children: textSpan != null ? <TextSpan>[textSpan] : null,
|
||||
),
|
||||
);
|
||||
...
|
||||
return result;
|
||||
}
|
||||
```
|
||||
### **基本实例**
|
||||
### **基本用法**
|
||||
我们可以让一段文本通过使用不同的TextSpan显示不同的样式。比如我们让"Hello beautiful world"的每个单词都显示不同的样式.
|
||||
|
||||
""";
|
||||
const String diff = """
|
||||
|
||||
|
||||
""";
|
||||
|
||||
class Demo extends StatefulWidget {
|
||||
static const String routeName = '/element/Form/Text/RichText';
|
||||
_Demo createState() => _Demo();
|
||||
|
@ -151,9 +151,8 @@ class _CupertinoAppFullDefault extends State {
|
||||
backgroundColor: CupertinoColors.destructiveRed,
|
||||
middle: Text('这里是标题', style: TextStyle(color: Colors.white)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('这里是内容', style: TextStyle(color: Colors.black))),
|
||||
backgroundColor: CupertinoColors.extraLightBackgroundGray,
|
||||
child: Center(child: Text('这里是内容', style: TextStyle(color: Colors.black))),
|
||||
backgroundColor: CupertinoColors.inactiveGray,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ class _CupertinoButtonFullDefault extends State {
|
||||
print('on Pressed!');
|
||||
},
|
||||
pressedOpacity:0.5,// 按下后的按钮不透明度
|
||||
color:CupertinoColors.darkBackgroundGray,
|
||||
child: Text('CupertinoButton'),
|
||||
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>[
|
||||
|
@ -181,6 +181,7 @@ flutter:
|
||||
- lib/widgets/themes/Cupertino/CupertinoPopupSurface/demo.dart
|
||||
- lib/widgets/themes/Cupertino/CupertinoScrollbar/demo.dart
|
||||
- lib/widgets/themes/Cupertino/CupertinoSegmentedControl/demo.dart
|
||||
- lib/widgets/elements/Form/Switch/Switch/demo.dart
|
||||
- lib/widgets/themes/Cupertino/CupertinoSlider/demo.dart
|
||||
- lib/widgets/themes/Cupertino/CupertinoSliverNavigationBar/demo.dart
|
||||
- lib/widgets/themes/Cupertino/CupertinoSwitch/demo.dart
|
||||
|