🚀 Launch 2.0.0+10
📱 Responsive home page
This commit is contained in:
parent
aa9724102b
commit
23301764ee
@ -45,22 +45,31 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("screenHome").tr(),
|
title: Text("screenHome").tr(),
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
body: LayoutBuilder(
|
||||||
|
builder: (context, constraints) {
|
||||||
|
return Align(
|
||||||
|
alignment: constraints.maxWidth > 640
|
||||||
|
? Alignment.center
|
||||||
|
: Alignment.topCenter,
|
||||||
|
child: Container(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 640),
|
||||||
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisAlignment: constraints.maxWidth > 640
|
||||||
|
? MainAxisAlignment.center
|
||||||
|
: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
MaterialBanner(
|
if (constraints.maxWidth <= 640) const Gap(8),
|
||||||
|
Card(
|
||||||
|
child: ListTile(
|
||||||
|
isThreeLine: true,
|
||||||
leading: const Icon(Symbols.construction),
|
leading: const Icon(Symbols.construction),
|
||||||
content: Column(
|
title: Text('nextVersionAlert').tr(),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
subtitle: Text('nextVersionNotice').tr(),
|
||||||
children: [
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
Text('nextVersionAlert').tr().bold(),
|
vertical: 8, horizontal: 16),
|
||||||
Text('nextVersionNotice').tr(),
|
|
||||||
],
|
|
||||||
).padding(vertical: 16),
|
|
||||||
actions: [
|
|
||||||
const SizedBox(),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
).padding(horizontal: 8),
|
||||||
_HomeDashSpecialDayWidget().padding(top: 8, horizontal: 8),
|
_HomeDashSpecialDayWidget().padding(top: 8, horizontal: 8),
|
||||||
StaggeredGrid.count(
|
StaggeredGrid.count(
|
||||||
crossAxisCount: 2,
|
crossAxisCount: 2,
|
||||||
@ -77,6 +86,10 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -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