refactor:按规范修改代码、注释等

This commit is contained in:
yifeng.yl
2019-02-19 11:53:15 +08:00
parent 1b266c0a76
commit c2da46a7df
120 changed files with 510 additions and 619 deletions

View File

@ -8,7 +8,7 @@
import 'package:flutter/material.dart';
/// BottomNavigationBar 默认的实例
// BottomNavigationBar 默认的实例
class BottomNavigationBarFullDefault extends StatefulWidget {
const BottomNavigationBarFullDefault() : super();
@override
@ -16,7 +16,7 @@ class BottomNavigationBarFullDefault extends StatefulWidget {
}
/// BottomNavigationBar 默认的实例,有状态
// BottomNavigationBar 默认的实例,有状态
class _BottomNavigationBarFullDefault extends State {
int _currentIndex = 1;

View File

@ -6,9 +6,9 @@
/// target: BottomNavigationBar 的示例
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as BottomNavigationBarDemo;
const String _text0 =
@ -49,9 +49,9 @@ class _DemoState extends State<Demo> {
}
/// 所有的 BottomNavigationBar widget
/// context: 运行上下文
/// that: 指向有状态的 StatefulWidget
// 所有的 BottomNavigationBar widget
// context: 运行上下文
// that: 指向有状态的 StatefulWidget
Widget allDemoBoxs(BuildContext context, _DemoState that) {
return Container(
//padding: EdgeInsets.only(bottom: 20.0, top: 20.0, left: 0, right: 0),
@ -73,8 +73,7 @@ Widget allDemoBoxs(BuildContext context, _DemoState that) {
}
/// 带align的text
// 带align的text
Widget textAlignBar(String txt) {
return Align(
alignment: FractionalOffset.centerLeft,

View File

@ -7,7 +7,7 @@
import 'package:flutter/material.dart';
/// BottomNavigationBarItem 默认的实例,无状态
// BottomNavigationBarItem 默认的实例,无状态
class BottomNavigationBarItemLessDefault extends StatelessWidget {
final widget;
final parent;
@ -39,19 +39,3 @@ class BottomNavigationBarItemLessDefault extends StatelessWidget {
);
}
}
//backgroundColor: Colors.grey,
//
//// body: PageView(
////
//// children: [
//// Index(),
//// Classify(),
//// Shopping(),
//// Myself()
//// ],
////
//// controller: pageController,
//// onPageChanged: onPageChanged
//// ),
//

View File

@ -45,9 +45,9 @@ class _DemoState extends State<Demo> {
}
/// 所有的 BottomNavigationBarItem widget
/// context: 运行上下文
/// that: 指向有状态的 StatefulWidget
// 所有的 BottomNavigationBarItem widget
// context: 运行上下文
// that: 指向有状态的 StatefulWidget
Widget allCheckboxs(BuildContext context, _DemoState that) {
return Container(
//padding: EdgeInsets.only(bottom: 20.0, top: 20.0, left: 0, right: 0),
@ -65,7 +65,7 @@ Widget allCheckboxs(BuildContext context, _DemoState that) {
}
/// 带align的text
// 带align的text
Widget textAlignBar(String txt) {
return Align(
alignment: FractionalOffset.centerLeft,

View File

@ -6,8 +6,8 @@
/// target: Navigation 的示例
import "package:flutter/material.dart";
import '../../../model/widget.dart';
import '../../../model/widget.dart';
import 'BottomNavigationBar/index.dart' as BottomNavigationBar;
import 'BottomNavigationBarItem/index.dart' as BottomNavigationBarItem;