mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-07-14 18:02:49 +08:00
fix: code conflict
This commit is contained in:
@ -16,7 +16,7 @@ class SliderDemo extends StatefulWidget {
|
||||
class _Demo extends State<SliderDemo> {
|
||||
double value = 0.0;
|
||||
Widget build(BuildContext context) {
|
||||
return new Slider(
|
||||
return Slider(
|
||||
value: value,//实际进度的位置
|
||||
inactiveColor: Colors.black12,//进度中不活动部分的颜色
|
||||
label: 'value: $value',
|
||||
@ -43,8 +43,8 @@ class SliderThemeDemo extends StatefulWidget {
|
||||
class _SliderThemeDemo extends State<SliderThemeDemo> {
|
||||
double value = 0.0;
|
||||
Widget build(BuildContext context) {
|
||||
return new Container(
|
||||
child: new SliderTheme(
|
||||
return Container(
|
||||
child: SliderTheme(
|
||||
data: SliderTheme.of(context).copyWith(
|
||||
// activeTickMarkColor:Colors.yellowAccent,
|
||||
activeTrackColor: Colors.yellowAccent,//实际进度的颜色
|
||||
@ -52,21 +52,21 @@ class _SliderThemeDemo extends State<SliderThemeDemo> {
|
||||
thumbColor: Colors.black,//滑块中心的颜色
|
||||
inactiveTrackColor:Colors.red,//默 认进度条的颜色
|
||||
valueIndicatorColor: Colors.blue,//提示进度的气派的背景色
|
||||
valueIndicatorTextStyle: new TextStyle(//提示气泡里面文字的样式
|
||||
valueIndicatorTextStyle: TextStyle(//提示气泡里面文字的样式
|
||||
color: Colors.white,
|
||||
),
|
||||
inactiveTickMarkColor:Colors.blue,//divisions对进度线分割后 断续线中间间隔的颜色
|
||||
overlayColor: Colors.pink,//滑块边缘颜色
|
||||
),
|
||||
child: new Container(
|
||||
child: Container(
|
||||
width: 340.0,
|
||||
margin: EdgeInsets.fromLTRB(0.0, 50.0, 0.0, 0.0),
|
||||
child: new Row(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
new Text('0.0'),
|
||||
new Expanded(
|
||||
Text('0.0'),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: new Slider(
|
||||
child: Slider(
|
||||
value: value,
|
||||
label: '$value',
|
||||
divisions: 10,
|
||||
@ -79,7 +79,7 @@ class _SliderThemeDemo extends State<SliderThemeDemo> {
|
||||
max: 100.0,
|
||||
),
|
||||
),
|
||||
new Text('100.0'),
|
||||
Text('100.0'),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -49,19 +49,19 @@ const contentB = '''
|
||||
如果当前Slider样式 无法满足需求, 可以通过 ** SliderTheme ** 定制复杂样式
|
||||
|
||||
```
|
||||
new SliderTheme(
|
||||
SliderTheme(
|
||||
data: SliderTheme.of(context).copyWith(
|
||||
activeTrackColor: Colors.yellowAccent,//实际进度的颜色
|
||||
inactiveTickMarkColor:Colors.black
|
||||
thumbColor: Colors.black,//滑块中心的颜色
|
||||
inactiveTrackColor:Colors.red,//默 认进度条的颜色
|
||||
valueIndicatorColor: Colors.blue,//提示进度的气派的背景色
|
||||
valueIndicatorTextStyle: new TextStyle(//提示气泡里面文字的样式
|
||||
valueIndicatorTextStyle: TextStyle(//提示气泡里面文字的样式
|
||||
color: Colors.white,
|
||||
),
|
||||
inactiveTickMarkColor:Colors.blue,//divisions对进度线分割后 断续线中间间隔的颜色
|
||||
overlayColor: Colors.pink,//滑块边缘颜色
|
||||
child: new Slider()
|
||||
child: Slider()
|
||||
)
|
||||
|
||||
```
|
||||
|
@ -17,8 +17,8 @@ class SliderThemeDemo extends StatefulWidget {
|
||||
class _SliderThemeDemo extends State<SliderThemeDemo> {
|
||||
double value = 0.0;
|
||||
Widget build(BuildContext context) {
|
||||
return new Container(
|
||||
child: new SliderTheme(
|
||||
return Container(
|
||||
child: SliderTheme(
|
||||
data: SliderTheme.of(context).copyWith(
|
||||
// activeTickMarkColor:Colors.yellowAccent,
|
||||
activeTrackColor: Colors.yellowAccent,//实际进度的颜色
|
||||
@ -26,21 +26,21 @@ class _SliderThemeDemo extends State<SliderThemeDemo> {
|
||||
thumbColor: Colors.black,//滑块中心的颜色
|
||||
inactiveTrackColor:Colors.red,//默 认进度条的颜色
|
||||
valueIndicatorColor: Colors.blue,//提示进度的气派的背景色
|
||||
valueIndicatorTextStyle: new TextStyle(//提示气泡里面文字的样式
|
||||
valueIndicatorTextStyle: TextStyle(//提示气泡里面文字的样式
|
||||
color: Colors.white,
|
||||
),
|
||||
inactiveTickMarkColor:Colors.blue,//divisions对进度线分割后 断续线中间间隔的颜色
|
||||
overlayColor: Colors.pink,//滑块边缘颜色
|
||||
),
|
||||
child: new Container(
|
||||
child: Container(
|
||||
width: 340.0,
|
||||
margin: EdgeInsets.fromLTRB(0.0, 50.0, 0.0, 0.0),
|
||||
child: new Row(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
new Text('0.0'),
|
||||
new Expanded(
|
||||
Text('0.0'),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: new Slider(
|
||||
child: Slider(
|
||||
value: value,
|
||||
label: '$value',
|
||||
divisions: 10,
|
||||
@ -53,7 +53,7 @@ class _SliderThemeDemo extends State<SliderThemeDemo> {
|
||||
max: 100.0,
|
||||
),
|
||||
),
|
||||
new Text('100.0'),
|
||||
Text('100.0'),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -24,7 +24,7 @@ const contentA = '''
|
||||
基本属性参考以下代码:
|
||||
|
||||
```
|
||||
new SliderTheme(
|
||||
SliderTheme(
|
||||
data: SliderThemeData({
|
||||
@required Color activeTrackColor,
|
||||
@required Color inactiveTrackColor,
|
||||
@ -67,7 +67,7 @@ class _Demo extends State<Demo> {
|
||||
codeUrl: 'elements/Form/Slider/SliderTheme/demo.dart',
|
||||
contentList: [
|
||||
contentA,
|
||||
new SliderThemeDemo(),
|
||||
SliderThemeDemo(),
|
||||
],
|
||||
docUrl: 'https://docs.flutter.io/flutter/material/SliderTheme-class.html',
|
||||
);
|
||||
|
@ -17,8 +17,8 @@ class SliderThemeDemo extends StatefulWidget {
|
||||
class _SliderThemeDemo extends State<SliderThemeDemo> {
|
||||
double value = 0.0;
|
||||
Widget build(BuildContext context) {
|
||||
return new Container(
|
||||
child: new SliderTheme(
|
||||
return Container(
|
||||
child: SliderTheme(
|
||||
data: SliderTheme.of(context).copyWith(
|
||||
// activeTickMarkColor:Colors.yellowAccent,
|
||||
activeTrackColor: Colors.yellowAccent,//实际进度的颜色
|
||||
@ -26,21 +26,21 @@ class _SliderThemeDemo extends State<SliderThemeDemo> {
|
||||
thumbColor: Colors.black,//滑块中心的颜色
|
||||
inactiveTrackColor:Colors.red,//默 认进度条的颜色
|
||||
valueIndicatorColor: Colors.blue,//提示进度的气派的背景色
|
||||
valueIndicatorTextStyle: new TextStyle(//提示气泡里面文字的样式
|
||||
valueIndicatorTextStyle: TextStyle(//提示气泡里面文字的样式
|
||||
color: Colors.white,
|
||||
),
|
||||
inactiveTickMarkColor:Colors.blue,//divisions对进度线分割后 断续线中间间隔的颜色
|
||||
overlayColor: Colors.pink,//滑块边缘颜色
|
||||
),
|
||||
child: new Container(
|
||||
child: Container(
|
||||
width: 340.0,
|
||||
margin: EdgeInsets.fromLTRB(0.0, 50.0, 0.0, 0.0),
|
||||
child: new Row(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
new Text('0.0'),
|
||||
new Expanded(
|
||||
Text('0.0'),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: new Slider(
|
||||
child: Slider(
|
||||
value: value,
|
||||
label: '$value',
|
||||
divisions: 10,
|
||||
@ -53,7 +53,7 @@ class _SliderThemeDemo extends State<SliderThemeDemo> {
|
||||
max: 100.0,
|
||||
),
|
||||
),
|
||||
new Text('100.0'),
|
||||
Text('100.0'),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -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,14 +32,14 @@ class Demo extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _Demo extends State<Demo> {
|
||||
|
||||
Color c = CupertinoColors.activeBlue;
|
||||
Widget build(BuildContext context) {
|
||||
return WidgetDemo(
|
||||
title: 'SliderThemeData',
|
||||
codeUrl: 'elements/Form/Slider/SliderThemeData/demo.dart',
|
||||
contentList: [
|
||||
contentA,
|
||||
new SliderThemeDemo()
|
||||
SliderThemeDemo()
|
||||
],
|
||||
docUrl: 'https://docs.flutter.io/flutter/material/SliderThemeData-class.html',
|
||||
);
|
||||
|
Reference in New Issue
Block a user