This commit is contained in:
xiaojia22326@163.com
2019-01-31 17:18:16 +08:00
parent acfe8f6ed8
commit c4cbd02123
130 changed files with 773 additions and 913 deletions

View File

@ -12,7 +12,7 @@ import 'package:flutter/material.dart';
class StackDefault extends StatelessWidget {
final int currIndex;
const StackDefault( this.currIndex) : super();
const StackDefault(this.currIndex) : super();
@override
Widget build(BuildContext context) {
@ -23,14 +23,14 @@ class StackDefault extends StatelessWidget {
// backgroundImage: AssetImage('images/timg.jpeg'),
// radius: 100.0,
// ),
// new Image.asset(
// Image.asset(
// 'images/timg.jpeg',
// width: 600.0,
// height: 240.0,
// fit: BoxFit.cover,
// ),
CircleAvatar(
backgroundColor: new Color(0xfff48fb1),
backgroundColor: Color(0xfff48fb1),
radius: 40.0,
),
Container(
@ -54,34 +54,34 @@ class StackDefault extends StatelessWidget {
class StackIndex extends StatelessWidget {
final int currIndex;
const StackIndex( this.currIndex) : super();
const StackIndex(this.currIndex) : super();
@override
Widget build(BuildContext context) {
return IndexedStack(
index: currIndex,
children: [
new Icon(
Icon(
Icons.update,
size: 40.0,
color: Color(0xffe91e63),
),
new Icon(
Icon(
Icons.access_alarm,
size: 40.0,
color: Color(0xffe91e63),
),
new Icon(
Icon(
Icons.add_alarm,
size: 40.0,
color: Color(0xffe91e63),
),
new Icon(
Icon(
Icons.access_time,
size: 40.0,
color: Color(0xffe91e63),
),
new Icon(
Icon(
Icons.alarm_off,
size: 40.0,
color: Color(0xffe91e63),

View File

@ -38,8 +38,7 @@ class _DemoState extends State<Demo> {
return WidgetDemo(
title: 'IndexedStack',
// desc: _desc,
codeUrl:
'elements/Frame/Stack/IndexedStack/demo.dart',
codeUrl: 'elements/Frame/Stack/IndexedStack/demo.dart',
docUrl: 'https://docs.flutter.io/flutter/widgets/IndexedStack-class.html',
contentList: [
_stackText0,
@ -50,20 +49,20 @@ class _DemoState extends State<Demo> {
}
Column _indexedStackCreate() {
return new Column(
return Column(
children: <Widget>[
SizedBox(
height: 10.0,
),
new Row(
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Container(
color: new Color(0xffe91e63),
color: Color(0xffe91e63),
child: StackDefault(0),
),
Container(
color: new Color(0xffe91e63),
color: Color(0xffe91e63),
child: StackDefault(1),
)
],
@ -71,7 +70,7 @@ class _DemoState extends State<Demo> {
SizedBox(
height: 10.0,
),
new Row(
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
StackIndex(0),
@ -91,7 +90,7 @@ class _DemoState extends State<Demo> {
onPressed: () {
_indexAdd();
},
icon: new Icon(Icons.adb),
icon: Icon(Icons.adb),
label: Text("点击这里")),
StackIndex(currIndex)
],