calendar page ui redesign

This commit is contained in:
Win 2024-03-04 09:09:57 +07:00
parent b4e912dd75
commit aa2d8db85f
3 changed files with 70 additions and 42 deletions

View File

@ -46,22 +46,58 @@ class _CalendarScreenState extends State<CalendarScreen> {
return Scaffold( return Scaffold(
body: _selectedDateRange == null body: _selectedDateRange == null
? const Padding( ? const Padding(
padding: EdgeInsets.all(30), padding: EdgeInsets.all(16),
child: Center( child: Center(
child: child:
Text('Select the date range by using the calendar button'), Text('Select the date range by using the calendar button'),
), ),
) )
: Padding( : Padding(
padding: const EdgeInsets.all(30), padding: const EdgeInsets.all(16),
child: Center( child: Column(children: [
Card(
child: Padding(
padding: const EdgeInsets.all(16),
child: SizedBox(
width: double.infinity,
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
const Text("Dates", const Text("Difference",
style: TextStyle( style: TextStyle(
fontSize: 30, fontWeight: FontWeight.bold)), fontSize: 40,
const Text("Start Date", style: TextStyle(fontSize: 14)), )),
const Text("Date Range",
style: TextStyle(fontSize: 14)),
Text(
"${diffYMD[3]} days \n${diffYMD[2]} weeks \n${diffYMD[1]} months\n${diffYMD[0]} years",
style: const TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold)),
const SizedBox(height: 10),
const Text("Date Range in days",
style: TextStyle(fontSize: 14)),
Text("$diffD days",
style: const TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold)),
],
),
))),
const SizedBox(height: 16),
Card(
child: Padding(
padding: const EdgeInsets.all(16),
child: SizedBox(
width: double.infinity,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text("Dates", style: TextStyle(fontSize: 40)),
const Text("Start Date",
style: TextStyle(fontSize: 14)),
const SizedBox(height: 5), const SizedBox(height: 5),
Text( Text(
startDateString, startDateString,
@ -69,30 +105,17 @@ class _CalendarScreenState extends State<CalendarScreen> {
fontSize: 22, fontWeight: FontWeight.bold), fontSize: 22, fontWeight: FontWeight.bold),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
const Text("End Date", style: TextStyle(fontSize: 14)), const Text("End Date",
style: TextStyle(fontSize: 14)),
const SizedBox(height: 5), const SizedBox(height: 5),
Text(endDateString, Text(endDateString,
style: const TextStyle( style: const TextStyle(
fontSize: 22, fontWeight: FontWeight.bold)), fontSize: 22, fontWeight: FontWeight.bold)),
const SizedBox(height: 20),
const Text("Difference",
style: TextStyle(
fontSize: 30, fontWeight: FontWeight.bold)),
const Text("Date Range", style: TextStyle(fontSize: 14)),
Text(
"${diffYMD[3]} days \n${diffYMD[2]} weeks \n${diffYMD[1]} months\n${diffYMD[0]} years",
style: const TextStyle(
fontSize: 24, fontWeight: FontWeight.bold)),
const SizedBox(height: 10),
const Text("Date Range in days",
style: TextStyle(fontSize: 14)),
Text("$diffD days",
style: const TextStyle(
fontSize: 24, fontWeight: FontWeight.bold)),
], ],
)),
), ),
), )
), ])),
// This button is used to show the date range picker // This button is used to show the date range picker
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(
onPressed: showRangeDialog, onPressed: showRangeDialog,

View File

@ -39,7 +39,8 @@ Future<void> communityDialogBuilder(BuildContext context) {
SimpleDialogOption( SimpleDialogOption(
onPressed: () async { onPressed: () async {
await launchUrl( await launchUrl(
Uri.parse('matrix.to/#/#datecalc:matrix.winscloud.net'), Uri.parse(
'https://matrix.to/#/#datecalc:matrix.winscloud.net'),
mode: LaunchMode.externalApplication); mode: LaunchMode.externalApplication);
}, },
child: Row( child: Row(

View File

@ -40,6 +40,10 @@
<image>https://raw.githubusercontent.com/AtiusAmy/atiusamy.github.io/master/images/2020-07-12_17.29.36.png</image> <image>https://raw.githubusercontent.com/AtiusAmy/atiusamy.github.io/master/images/2020-07-12_17.29.36.png</image>
</screenshot> </screenshot>
</screenshots> </screenshots>
<branding>
<color type="primary" scheme_preference="light">#6f6385</color>
<color type="primary" scheme_preference="dark">#130b22</color>
</branding>
<content_rating type="oars-1.0"/> <content_rating type="oars-1.0"/>
<releases> <releases>
<release version="0.0.7" date="2024-03-03"> <release version="0.0.7" date="2024-03-03">