build(pub): 更新依赖

This commit is contained in:
李东云
2023-03-20 15:52:49 +08:00
parent 1e0e834197
commit 16a42bd6b3
24 changed files with 104 additions and 122 deletions

View File

@@ -1,8 +1,9 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
//import 'common/access_control_filter.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart'
if (dart.library.html) 'package:flutter_native_splash/flutter_native_splash_web.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
// import 'package:flutter_native_splash/flutter_native_splash_web.dart';
// import 'package:flutter_localizations/flutter_localizations.dart';
import 'app.dart';
@@ -30,16 +31,15 @@ class Bistro extends StatelessWidget {
primaryColor: const Color(0xFFff857a),
// primaryColor: const Color(0xFF5f2500),
primaryColorDark: Colors.white60,
backgroundColor: const Color(0xFFFFF7F8),
// backgroundColor: const Color(0xFFcf9237),
bottomAppBarColor: const Color(0xFFFFF7F8),
appBarTheme: const AppBarTheme(color: Colors.white),
// appBarTheme: const AppBarTheme(color: Color(0xFF5f2500)),
bottomAppBarTheme: const BottomAppBarTheme(color: Color(0xFFFFF7F8)),
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.amber,
).copyWith(
secondary: Colors.deepOrangeAccent,
),
)
.copyWith(
secondary: Colors.deepOrangeAccent,
)
.copyWith(background: const Color(0xFFFFF7F8)),
),
home: const BistroFrame(
title: '小酒馆',
@@ -65,10 +65,10 @@ class BistroFrame extends StatefulWidget {
final String title;
@override
_BistroFrameState createState() => _BistroFrameState();
BistroFrameState createState() => BistroFrameState();
}
class _BistroFrameState extends State<BistroFrame> {
class BistroFrameState extends State<BistroFrame> {
late Widget _body;
int _index = 3;
@@ -108,14 +108,14 @@ class _BistroFrameState extends State<BistroFrame> {
void initData() {
_body = IndexedStack(
children: <Widget>[
const App(),
News(),
News(),
const Life(),
const Mine(),
],
index: _index,
children: const <Widget>[
App(),
News(),
News(),
Life(),
Mine(),
],
);
}
@@ -123,13 +123,21 @@ class _BistroFrameState extends State<BistroFrame> {
// This is where you can initialize the resources needed by your app while
// the splash screen is displayed. Remove the following example because
// delaying the user experience is a bad design practice!
print('ready in 3...');
// if (kDebugMode) {
// print('ready in 3...');
// }
// await Future.delayed(const Duration(seconds: 1));
if (kDebugMode) {
print('ready in 2...');
}
await Future.delayed(const Duration(seconds: 1));
print('ready in 2...');
if (kDebugMode) {
print('ready in 1...');
}
await Future.delayed(const Duration(seconds: 1));
print('ready in 1...');
await Future.delayed(const Duration(seconds: 1));
print('go!');
if (kDebugMode) {
print('go!');
}
FlutterNativeSplash.remove();
}
@@ -148,12 +156,12 @@ class _BistroFrameState extends State<BistroFrame> {
bottomNavigationBar: BottomAppBar(
shape: const CircularNotchedRectangle(),
child: Row(
children: bottomNavigationBarData,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: bottomNavigationBarData,
),
),
floatingActionButton: FloatingActionButton(
backgroundColor: Theme.of(context).backgroundColor,
backgroundColor: Theme.of(context).colorScheme.background,
onPressed: () => {},
child: Icon(
Icons.search,