parent
03164d9afd
commit
76c7893f74
@ -1,3 +1,9 @@
|
|||||||
# ansu_ui 安速物流移动组件
|
# ansu_ui 安速物流移动组件
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
|
## 贡献
|
||||||
|
|
||||||
|
### 组件命名
|
||||||
|
|
||||||
|
* 命名规则 `as_***`,例如 `as_button`
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
import 'package:ansu_ui/ansu_ui.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ExampleScaffold extends StatefulWidget {
|
||||||
|
ExampleScaffold({Key key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ExampleScaffoldState createState() => _ExampleScaffoldState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ExampleScaffoldState extends State<ExampleScaffold> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return ASScaffold(
|
||||||
|
title: '标题',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,8 @@
|
|||||||
library ansu_ui;
|
library ansu_ui;
|
||||||
|
|
||||||
export 'buttons/as_button.dart';
|
export 'buttons/as_button.dart';
|
||||||
|
export 'scaffold/as_scaffold.dart';
|
||||||
|
export 'styles/as_colors.dart';
|
||||||
|
|
||||||
|
//`BOTTOM` is external lib
|
||||||
export 'package:flutter_screenutil/flutter_screenutil.dart';
|
export 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
import 'package:ansu_ui/ansu_ui.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ASBackButton extends StatelessWidget {
|
||||||
|
final Color color;
|
||||||
|
const ASBackButton({Key key, this.color = kDarkColor}) : super(key: key);
|
||||||
|
|
||||||
|
const ASBackButton.white({Key key})
|
||||||
|
: color = kForegroundColor,
|
||||||
|
super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Navigator.canPop(context)
|
||||||
|
? IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
CupertinoIcons.chevron_back,
|
||||||
|
size: 24,
|
||||||
|
color: color,
|
||||||
|
),
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
)
|
||||||
|
: SizedBox();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
///主要暗色
|
||||||
|
const Color kDarkColor = Color(0xFF333333);
|
||||||
|
|
||||||
|
///文本默认颜色
|
||||||
|
const Color kTextColor = kDarkColor;
|
||||||
|
|
||||||
|
///主题色
|
||||||
|
const Color kPrimaryColor = Color(0xFFF6B72D);
|
||||||
|
|
||||||
|
///前景色
|
||||||
|
const Color kForegroundColor = Color(0xFFFFFFFF);
|
||||||
|
|
||||||
|
///背景色
|
||||||
|
const Color kBackgroundColor = Color(0xFFF6F6F6);
|
Loading…
Reference in new issue