add get support

null_safety
小赖 4 years ago
parent df8a05c694
commit 2b8b67dfeb

@ -1,8 +1,9 @@
# ansu_ui 安速物流移动组件
## dep
## dep 依赖
![flutter_screenutil](https://img.shields.io/badge/flutter__screenutil-3.2.0-brightgreen)
![get](https://img.shields.io/badge/get-3.17.1-brightgreen)
## Getting Started

@ -55,6 +55,12 @@ class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return ASScaffold(
leading: navigator.canPop()
? IconButton(
icon: Icon(Icons.backpack, color: Colors.black),
onPressed: () {},
)
: SizedBox(),
title: '安速组件',
body: ListView(
padding: EdgeInsets.all(16.w),

@ -1,6 +1,7 @@
import 'package:ansu_ui/ansu_ui.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
///
///
@ -17,7 +18,7 @@ class ASBackButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Navigator.canPop(context)
return navigator.canPop()
? IconButton(
icon: Icon(
CupertinoIcons.chevron_back,

@ -54,7 +54,7 @@ class _ASScaffoldState extends State<ASScaffold> {
appBar: AppBar(
backgroundColor: kForegroundColor,
elevation: 0,
leading: ASBackButton(),
leading: widget.leading ?? ASBackButton(),
centerTitle: true,
title: DefaultTextStyle(
style: TextStyle(

@ -67,6 +67,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
get:
dependency: "direct main"
description:
name: get
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.17.1"
matcher:
dependency: transitive
description:
@ -150,5 +157,5 @@ packages:
source: hosted
version: "2.1.0-nullsafety.3"
sdks:
dart: ">=2.10.0-110 <2.11.0"
dart: ">=2.10.0 <2.11.0"
flutter: ">=1.17.0"

@ -11,6 +11,7 @@ dependencies:
flutter:
sdk: flutter
flutter_screenutil: ^3.2.0
get: ^3.17.1
dev_dependencies:
flutter_test:

Loading…
Cancel
Save