🚀 Launch 2.0.0+10
📱 Responsive home page
This commit is contained in:
parent
aa9724102b
commit
23301764ee
@ -45,37 +45,50 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("screenHome").tr(),
|
title: Text("screenHome").tr(),
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
body: LayoutBuilder(
|
||||||
child: Column(
|
builder: (context, constraints) {
|
||||||
children: [
|
return Align(
|
||||||
MaterialBanner(
|
alignment: constraints.maxWidth > 640
|
||||||
leading: const Icon(Symbols.construction),
|
? Alignment.center
|
||||||
content: Column(
|
: Alignment.topCenter,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Container(
|
||||||
children: [
|
constraints: const BoxConstraints(maxWidth: 640),
|
||||||
Text('nextVersionAlert').tr().bold(),
|
child: SingleChildScrollView(
|
||||||
Text('nextVersionNotice').tr(),
|
child: Column(
|
||||||
],
|
mainAxisAlignment: constraints.maxWidth > 640
|
||||||
).padding(vertical: 16),
|
? MainAxisAlignment.center
|
||||||
actions: [
|
: MainAxisAlignment.start,
|
||||||
const SizedBox(),
|
children: [
|
||||||
],
|
if (constraints.maxWidth <= 640) const Gap(8),
|
||||||
|
Card(
|
||||||
|
child: ListTile(
|
||||||
|
isThreeLine: true,
|
||||||
|
leading: const Icon(Symbols.construction),
|
||||||
|
title: Text('nextVersionAlert').tr(),
|
||||||
|
subtitle: Text('nextVersionNotice').tr(),
|
||||||
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
|
vertical: 8, horizontal: 16),
|
||||||
|
),
|
||||||
|
).padding(horizontal: 8),
|
||||||
|
_HomeDashSpecialDayWidget().padding(top: 8, horizontal: 8),
|
||||||
|
StaggeredGrid.count(
|
||||||
|
crossAxisCount: 2,
|
||||||
|
mainAxisSpacing: 8,
|
||||||
|
crossAxisSpacing: 8,
|
||||||
|
children: kCards.map((card) {
|
||||||
|
return StaggeredGridTile.count(
|
||||||
|
crossAxisCellCount: card.cols,
|
||||||
|
mainAxisCellCount: card.rows,
|
||||||
|
child: card.child,
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
).padding(horizontal: 8),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
_HomeDashSpecialDayWidget().padding(top: 8, horizontal: 8),
|
);
|
||||||
StaggeredGrid.count(
|
},
|
||||||
crossAxisCount: 2,
|
|
||||||
mainAxisSpacing: 8,
|
|
||||||
crossAxisSpacing: 8,
|
|
||||||
children: kCards.map((card) {
|
|
||||||
return StaggeredGridTile.count(
|
|
||||||
crossAxisCellCount: card.cols,
|
|
||||||
mainAxisCellCount: card.rows,
|
|
||||||
child: card.child,
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
).padding(horizontal: 8),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -210,7 +223,11 @@ class _HomeDashCheckInWidgetState extends State<_HomeDashCheckInWidget> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_pullCheckIn();
|
final ua = context.read<UserProvider>();
|
||||||
|
Future.delayed(const Duration(milliseconds: 500), () async {
|
||||||
|
if (!ua.isAuthorized) return;
|
||||||
|
await _pullCheckIn();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
const kMaterialYouToggleStoreKey = 'app_theme_material_you';
|
const kMaterialYouToggleStoreKey = 'app_theme_material_you';
|
||||||
@ -43,7 +42,6 @@ Future<ThemeData> createAppTheme(
|
|||||||
appBarTheme: AppBarTheme(
|
appBarTheme: AppBarTheme(
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
),
|
),
|
||||||
textTheme: GoogleFonts.robotoTextTheme(),
|
|
||||||
scaffoldBackgroundColor: Colors.transparent,
|
scaffoldBackgroundColor: Colors.transparent,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 2.0.0+9
|
version: 2.0.0+10
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.5.4
|
sdk: ^3.5.4
|
||||||
|
Loading…
Reference in New Issue
Block a user