update readme

null_safety
小赖 4 years ago
parent b4bebc87e6
commit 7fd6040598

@ -1,5 +1,7 @@
{
"cSpell.words": [
"ansu"
"ansu",
"easyrefresh",
"screenutil"
]
}

@ -9,6 +9,7 @@
### 生成关键代码
```bash
cd example
flutter pub run grinder update-code-segments
```
@ -28,17 +29,27 @@ minSdkVersion 21
* [x] Scaffold
* [x] Button
* [ ] Extension
* [ ] num ext
* [ ] string ext
* [ ] widget ext
* [ ] image ext
* [ ] list ext
* [ ] text ext
* [ ] text style ext
* [ ] Badge
* [ ] Bars
* [ ] Box
* [x] TabBar
* [ ] NavigationBar
* [ ] CheckBox
* [ ] Dialog
* [ ] Divider
* [ ] Drawer
* [ ] ListTile
* [ ] Pickers
* [x] numeric Picker
* [ ] PopUpMenu
* [ ] Refresh
* [ ] Tag
* [x] Tag
* [ ] TextField
* [ ] Toast
* [ ] Utils

@ -27,12 +27,11 @@ class _CodeViewState extends State<CodeView> {
baseStyle: codeTheme.copyWith(color: Colors.white70),
numberStyle: codeTheme.copyWith(color: const Color(0xFFBD93F9)),
commentStyle: codeTheme.copyWith(color: const Color(0xFF808080)),
keywordStyle: codeTheme.copyWith(color: const Color(0xFF1CDEC9)),
stringStyle: codeTheme.copyWith(color: const Color(0xFFFFA65C)),
punctuationStyle:
codeTheme.copyWith(color: const Color(0xFF8BE9FD)),
classStyle: codeTheme.copyWith(color: const Color(0xFFD65BAD)),
constantStyle: codeTheme.copyWith(color: const Color(0xFFFF8383)),
keywordStyle: codeTheme.copyWith(color: Colors.blue),
stringStyle: codeTheme.copyWith(color: Colors.green),
punctuationStyle: codeTheme.copyWith(color: Colors.teal),
classStyle: codeTheme.copyWith(color: Colors.yellow),
constantStyle: codeTheme.copyWith(color: Colors.pink),
child:
Builder(builder: (context) => Text.rich(widget.text(context))),
)),

@ -1,6 +1,10 @@
import 'package:ansu_ui/ansu_ui.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'codeviewer/code_segments.dart';
import 'common/code_view.dart';
class ExampleBottomButton extends StatefulWidget {
ExampleBottomButton({Key key}) : super(key: key);
@ -14,10 +18,24 @@ class _ExampleBottomButtonState extends State<ExampleBottomButton> {
Widget build(BuildContext context) {
return ASScaffold(
title: 'ASBottomButton',
actions: [
IconButton(
icon: Icon(
Icons.code,
color: Colors.black54,
),
onPressed: () => Get.to(
CodeView(
text: (context) => CodeSegments.bottomButton(context),
),
),
)
],
body: Center(),
bottomNavigationBar: Column(
mainAxisSize: MainAxisSize.min,
children: [
// BEGIN bottomButton
ASBottomButton.infinity(
title: '无渐变infinity',
onPressed: () {},
@ -42,6 +60,7 @@ class _ExampleBottomButtonState extends State<ExampleBottomButton> {
))
],
)
// END
],
),
);

@ -1,5 +1,8 @@
import 'package:ansu_ui/ansu_ui.dart';
import 'package:example/codeviewer/code_segments.dart';
import 'package:example/common/code_view.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class ExampleNumericButton extends StatefulWidget {
ExampleNumericButton({Key key}) : super(key: key);
@ -16,15 +19,28 @@ class _ExampleNumericButtonState extends State<ExampleNumericButton> {
}
int _pickedValue = 0;
@override
Widget build(BuildContext context) {
return ASScaffold(
title: '数量选择器',
actions: [
IconButton(
icon: Icon(
Icons.code,
color: Colors.black54,
),
onPressed: () => Get.to(
CodeView(
text: (context) => CodeSegments.numericButton(context),
),
),
)
],
body: Builder(
builder: (context) {
return ListView(
children: [
// BEGIN numericButton
ListTile(
title: Text(_pickedValue.toString()),
subtitle: Text('一般用法'),
@ -44,6 +60,8 @@ class _ExampleNumericButtonState extends State<ExampleNumericButton> {
},
),
),
// END
],
);
},

@ -4,6 +4,9 @@ import 'package:ansu_ui/ansu_ui.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'codeviewer/code_segments.dart';
import 'common/code_view.dart';
class ExamplePicker extends StatefulWidget {
ExamplePicker({Key key}) : super(key: key);
@ -16,8 +19,22 @@ class _ExamplePickerState extends State<ExamplePicker> {
Widget build(BuildContext context) {
return ASScaffold(
title: '选择器',
actions: [
IconButton(
icon: Icon(
Icons.code,
color: Colors.black54,
),
onPressed: () => Get.to(
CodeView(
text: (context) => CodeSegments.picker(context),
),
),
)
],
body: ListView(
children: [
// BEGIN picker
ListTile(
title: Text('日期选择器'),
subtitle: Text('DatePicker'),
@ -74,6 +91,7 @@ class _ExamplePickerState extends State<ExamplePicker> {
},
),
),
// END
],
),
);

@ -1,5 +1,8 @@
import 'package:ansu_ui/ansu_ui.dart';
import 'package:example/codeviewer/code_segments.dart';
import 'package:example/common/code_view.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class ExampleTabBar extends StatefulWidget {
ExampleTabBar({Key key}) : super(key: key);
@ -36,11 +39,23 @@ class _ExampleTabBarState extends State<ExampleTabBar>
Widget build(BuildContext context) {
return ASScaffold(
title: '选项卡 TabBar',
actions: [
IconButton(
icon: Icon(
Icons.code,
color: Colors.black54,
),
onPressed: () => Get.to(
CodeView(text: (context) => CodeSegments.tabBar(context)),
),
)
],
body: Material(
color: kForegroundColor,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
// BEGIN tabBar
ASTabBar(
items: ['全部', 'Part1', 'Part2'],
controller: _tabController1,
@ -61,6 +76,8 @@ class _ExampleTabBarState extends State<ExampleTabBar>
.toList(),
controller: _tabController4,
),
// END
],
),
),

@ -1,6 +1,10 @@
import 'package:ansu_ui/ansu_ui.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'codeviewer/code_segments.dart';
import 'common/code_view.dart';
class ExampleTag extends StatefulWidget {
ExampleTag({Key key}) : super(key: key);
@ -15,8 +19,22 @@ class _ExampaleTagState extends State<ExampleTag> {
Widget build(BuildContext context) {
return ASScaffold(
title: 'ASTag',
actions: [
IconButton(
icon: Icon(
Icons.code,
color: Colors.black54,
),
onPressed: () => Get.to(
CodeView(
text: (context) => CodeSegments.tag(context),
),
),
)
],
body: Column(
children: [
// BEGIN tag
ListTile(
title: Text('yellowSolid'),
trailing: ASTag.yellowSolid(
@ -65,6 +83,7 @@ class _ExampaleTagState extends State<ExampleTag> {
text: 'TAG'.text,
),
),
// END
],
));
}

Loading…
Cancel
Save