calendar page ui redesign
This commit is contained in:
parent
b4e912dd75
commit
aa2d8db85f
|
@ -46,53 +46,76 @@ 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: [
|
||||||
child: Column(
|
Card(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Padding(
|
||||||
children: [
|
padding: const EdgeInsets.all(16),
|
||||||
const Text("Dates",
|
child: SizedBox(
|
||||||
style: TextStyle(
|
width: double.infinity,
|
||||||
fontSize: 30, fontWeight: FontWeight.bold)),
|
child: Column(
|
||||||
const Text("Start Date", style: TextStyle(fontSize: 14)),
|
mainAxisSize: MainAxisSize.min,
|
||||||
const SizedBox(height: 5),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Text(
|
children: [
|
||||||
startDateString,
|
const Text("Difference",
|
||||||
style: const TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 22, fontWeight: FontWeight.bold),
|
fontSize: 40,
|
||||||
),
|
)),
|
||||||
const SizedBox(height: 10),
|
const Text("Date Range",
|
||||||
const Text("End Date", style: TextStyle(fontSize: 14)),
|
style: TextStyle(fontSize: 14)),
|
||||||
const SizedBox(height: 5),
|
Text(
|
||||||
Text(endDateString,
|
"${diffYMD[3]} days \n${diffYMD[2]} weeks \n${diffYMD[1]} months\n${diffYMD[0]} years",
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 22, fontWeight: FontWeight.bold)),
|
fontSize: 24,
|
||||||
const SizedBox(height: 20),
|
fontWeight: FontWeight.bold)),
|
||||||
const Text("Difference",
|
const SizedBox(height: 10),
|
||||||
style: TextStyle(
|
const Text("Date Range in days",
|
||||||
fontSize: 30, fontWeight: FontWeight.bold)),
|
style: TextStyle(fontSize: 14)),
|
||||||
const Text("Date Range", style: TextStyle(fontSize: 14)),
|
Text("$diffD days",
|
||||||
Text(
|
style: const TextStyle(
|
||||||
"${diffYMD[3]} days \n${diffYMD[2]} weeks \n${diffYMD[1]} months\n${diffYMD[0]} years",
|
fontSize: 24,
|
||||||
style: const TextStyle(
|
fontWeight: FontWeight.bold)),
|
||||||
fontSize: 24, fontWeight: FontWeight.bold)),
|
],
|
||||||
const SizedBox(height: 10),
|
),
|
||||||
const Text("Date Range in days",
|
))),
|
||||||
style: TextStyle(fontSize: 14)),
|
const SizedBox(height: 16),
|
||||||
Text("$diffD days",
|
Card(
|
||||||
style: const TextStyle(
|
child: Padding(
|
||||||
fontSize: 24, fontWeight: FontWeight.bold)),
|
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),
|
||||||
|
Text(
|
||||||
|
startDateString,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 22, fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
const Text("End Date",
|
||||||
|
style: TextStyle(fontSize: 14)),
|
||||||
|
const SizedBox(height: 5),
|
||||||
|
Text(endDateString,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 22, 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,
|
||||||
|
|
|
@ -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(
|
||||||
|
|
|
@ -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">
|
||||||
|
|
Loading…
Reference in New Issue