Merge remote-tracking branch 'origin/main_design2.0' into main_design2.0
# Conflicts: # lib/l10n/app_ar.arb # lib/l10n/app_en.arbmain_design2.0
commit
7666364083
@ -0,0 +1,11 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.47805 13.2405C8.47805 12.9399 8.23419 12.6963 7.9333 12.6963H6.03234C5.73179 12.6963 5.48788 12.9399 5.48788 13.2405V15.1412C5.48788 15.4422 5.73179 15.6859 6.03234 15.6859H7.9333C8.23419 15.6859 8.47805 15.4422 8.47805 15.1412V13.2405Z" fill="#163A51"/>
|
||||
<path d="M13.2289 13.2405C13.2289 12.9399 12.985 12.6963 12.6847 12.6963H10.7835C10.483 12.6963 10.2391 12.9399 10.2391 13.2405V15.1412C10.2391 15.4422 10.483 15.6859 10.7835 15.6859H12.6847C12.985 15.6859 13.2289 15.4422 13.2289 15.1412V13.2405Z" fill="#163A51"/>
|
||||
<path d="M17.9798 13.2405C17.9798 12.9399 17.7359 12.6963 17.4354 12.6963H15.5344C15.2335 12.6963 14.9897 12.9399 14.9897 13.2405V15.1412C14.9897 15.4422 15.2335 15.6859 15.5344 15.6859H17.4354C17.7359 15.6859 17.9798 15.4422 17.9798 15.1412V13.2405Z" fill="#163A51"/>
|
||||
<path d="M8.47805 17.9918C8.47805 17.6906 8.23419 17.4473 7.9333 17.4473H6.03234C5.73179 17.4473 5.48788 17.6906 5.48788 17.9918V19.8921C5.48788 20.193 5.73179 20.4366 6.03234 20.4366H7.9333C8.23419 20.4366 8.47805 20.1929 8.47805 19.8921V17.9918Z" fill="#163A51"/>
|
||||
<path d="M13.2289 17.9918C13.2289 17.6906 12.985 17.4473 12.6847 17.4473H10.7835C10.483 17.4473 10.2391 17.6906 10.2391 17.9918V19.8921C10.2391 20.193 10.483 20.4366 10.7835 20.4366H12.6847C12.985 20.4366 13.2289 20.1929 13.2289 19.8921V17.9918Z" fill="#163A51"/>
|
||||
<path d="M17.9798 17.9918C17.9798 17.6906 17.7359 17.4473 17.4356 17.4473H15.5344C15.2335 17.4473 14.9897 17.6906 14.9897 17.9918V19.8921C14.9897 20.193 15.2335 20.4366 15.5344 20.4366H17.4356C17.7359 20.4366 17.9798 20.1929 17.9798 19.8921V17.9918Z" fill="#163A51"/>
|
||||
<path d="M21.379 2.67253V5.57572C21.379 6.88793 20.3145 7.94537 19.0025 7.94537H17.5033C16.1912 7.94537 15.1126 6.88793 15.1126 5.57572V2.66211H8.35533V5.57572C8.35533 6.88793 7.27675 7.94537 5.96483 7.94537H4.46535C3.15339 7.94537 2.08892 6.88793 2.08892 5.57572V2.67253C0.942245 2.7071 0 3.65593 0 4.82217V21.8362C0 23.0244 0.963042 24.0002 2.15121 24.0002H21.3167C22.5031 24.0002 23.4679 23.0224 23.4679 21.8362V4.82217C23.4679 3.65593 22.5257 2.7071 21.379 2.67253ZM20.6827 20.7767C20.6827 21.2902 20.2664 21.7068 19.7527 21.7068H3.67424C3.16057 21.7068 2.74424 21.2902 2.74424 20.7767V11.9883C2.74424 11.4747 3.16052 11.0581 3.67424 11.0581H19.7526C20.2663 11.0581 20.6826 11.4747 20.6826 11.9883L20.6827 20.7767Z" fill="#163A51"/>
|
||||
<path d="M4.46017 6.38874H5.94308C6.39318 6.38874 6.75813 6.02432 6.75813 5.57422V0.81481C6.75813 0.364656 6.39318 0 5.94308 0H4.46017C4.01001 0 3.64511 0.364656 3.64511 0.81481V5.57422C3.64511 6.02432 4.01001 6.38874 4.46017 6.38874Z" fill="#163A51"/>
|
||||
<path d="M17.4842 6.38874H18.9671C19.4169 6.38874 19.7818 6.02432 19.7818 5.57422V0.81481C19.7819 0.364656 19.4169 0 18.9671 0H17.4842C17.0341 0 16.6691 0.364656 16.6691 0.81481V5.57422C16.6691 6.02432 17.0341 6.38874 17.4842 6.38874Z" fill="#163A51"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
@ -0,0 +1,11 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.47808 13.2405C8.47808 12.9399 8.23422 12.6963 7.93333 12.6963H6.03237C5.73182 12.6963 5.48792 12.9399 5.48792 13.2405V15.1412C5.48792 15.4422 5.73182 15.6859 6.03237 15.6859H7.93333C8.23422 15.6859 8.47808 15.4422 8.47808 15.1412V13.2405Z" fill="#163A51"/>
|
||||
<path d="M13.2289 13.2405C13.2289 12.9399 12.985 12.6963 12.6847 12.6963H10.7835C10.483 12.6963 10.2391 12.9399 10.2391 13.2405V15.1412C10.2391 15.4422 10.483 15.6859 10.7835 15.6859H12.6847C12.985 15.6859 13.2289 15.4422 13.2289 15.1412V13.2405Z" fill="#163A51"/>
|
||||
<path d="M17.9798 13.2405C17.9798 12.9399 17.7359 12.6963 17.4353 12.6963H15.5344C15.2335 12.6963 14.9896 12.9399 14.9896 13.2405V15.1412C14.9896 15.4422 15.2335 15.6859 15.5344 15.6859H17.4353C17.7359 15.6859 17.9798 15.4422 17.9798 15.1412V13.2405Z" fill="#163A51"/>
|
||||
<path d="M8.47808 17.9918C8.47808 17.6906 8.23422 17.4473 7.93333 17.4473H6.03237C5.73182 17.4473 5.48792 17.6906 5.48792 17.9918V19.8921C5.48792 20.193 5.73182 20.4366 6.03237 20.4366H7.93333C8.23422 20.4366 8.47808 20.1929 8.47808 19.8921V17.9918Z" fill="#163A51"/>
|
||||
<path d="M13.2289 17.9918C13.2289 17.6906 12.985 17.4473 12.6847 17.4473H10.7835C10.483 17.4473 10.2391 17.6906 10.2391 17.9918V19.8921C10.2391 20.193 10.483 20.4366 10.7835 20.4366H12.6847C12.985 20.4366 13.2289 20.1929 13.2289 19.8921V17.9918Z" fill="#163A51"/>
|
||||
<path d="M17.9798 17.9918C17.9798 17.6906 17.7359 17.4473 17.4356 17.4473H15.5344C15.2335 17.4473 14.9896 17.6906 14.9896 17.9918V19.8921C14.9896 20.193 15.2335 20.4366 15.5344 20.4366H17.4356C17.7359 20.4366 17.9798 20.1929 17.9798 19.8921V17.9918Z" fill="#163A51"/>
|
||||
<path d="M21.379 2.67253V5.57572C21.379 6.88793 20.3145 7.94537 19.0025 7.94537H17.5033C16.1912 7.94537 15.1126 6.88793 15.1126 5.57572V2.66211H8.35533V5.57572C8.35533 6.88793 7.27675 7.94537 5.96483 7.94537H4.46535C3.15339 7.94537 2.08892 6.88793 2.08892 5.57572V2.67253C0.942245 2.7071 0 3.65593 0 4.82217V21.8362C0 23.0244 0.963042 24.0002 2.15121 24.0002H21.3167C22.5031 24.0002 23.4679 23.0224 23.4679 21.8362V4.82217C23.4679 3.65593 22.5257 2.7071 21.379 2.67253ZM20.6827 20.7767C20.6827 21.2902 20.2664 21.7068 19.7527 21.7068H3.67424C3.16057 21.7068 2.74424 21.2902 2.74424 20.7767V11.9883C2.74424 11.4747 3.16052 11.0581 3.67424 11.0581H19.7526C20.2663 11.0581 20.6826 11.4747 20.6826 11.9883L20.6827 20.7767Z" fill="#163A51"/>
|
||||
<path d="M4.4602 6.38874H5.94311C6.39321 6.38874 6.75817 6.02432 6.75817 5.57422V0.81481C6.75817 0.364656 6.39321 0 5.94311 0H4.4602C4.01004 0 3.64514 0.364656 3.64514 0.81481V5.57422C3.64514 6.02432 4.01004 6.38874 4.4602 6.38874Z" fill="#163A51"/>
|
||||
<path d="M17.4841 6.38874H18.967C19.4169 6.38874 19.7818 6.02432 19.7818 5.57422V0.81481C19.7819 0.364656 19.4169 0 18.967 0H17.4841C17.0341 0 16.6691 0.364656 16.6691 0.81481V5.57422C16.6691 6.02432 17.0341 6.38874 17.4841 6.38874Z" fill="#163A51"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
@ -0,0 +1,83 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:test_sa/extensions/int_extensions.dart';
|
||||
import 'package:test_sa/extensions/text_extensions.dart';
|
||||
import 'package:test_sa/extensions/widget_extensions.dart';
|
||||
import 'package:test_sa/new_views/app_style/app_color.dart';
|
||||
import 'package:test_sa/new_views/pages/land_page/calender_fragments/daily_fragment.dart';
|
||||
import 'package:test_sa/new_views/pages/land_page/calender_fragments/weekly_fragment.dart';
|
||||
|
||||
import 'calender_fragments/monthly_fragment.dart';
|
||||
|
||||
class CalendarPage extends StatefulWidget {
|
||||
const CalendarPage({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CalendarPage> createState() => _CalendarPageState();
|
||||
}
|
||||
|
||||
class _CalendarPageState extends State<CalendarPage> with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tabController = TabController(length: 3, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// todo @sikander, hiding My shift view, later when they add data, then will us it.
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"My Shift".heading5(context),
|
||||
8.height,
|
||||
"Sunday to Thursday".bodyText(context),
|
||||
"09:00 to 18:00".bodyText(context).custom(color: AppColor.neutral50),
|
||||
],
|
||||
).toShadowContainer,
|
||||
),
|
||||
16.height,
|
||||
Container(
|
||||
decoration: BoxDecoration(color: AppColor.neutral30, borderRadius: BorderRadius.circular(16)),
|
||||
child: TabBar(
|
||||
controller: _tabController,
|
||||
padding: EdgeInsets.zero,
|
||||
labelColor: AppColor.neutral60,
|
||||
unselectedLabelColor: AppColor.neutral20,
|
||||
indicatorPadding: const EdgeInsets.all(4),
|
||||
indicator: BoxDecoration(color: Theme.of(context).cardColor, borderRadius: BorderRadius.circular(13)),
|
||||
onTap: (index) {
|
||||
setState(() {});
|
||||
},
|
||||
tabs: [
|
||||
Tab(text: "Monthly", height: 57.toScreenHeight),
|
||||
Tab(text: "Weekly", height: 57.toScreenHeight),
|
||||
Tab(text: "Daily", height: 57.toScreenHeight),
|
||||
],
|
||||
),
|
||||
),
|
||||
8.height,
|
||||
TabBarView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
controller: _tabController,
|
||||
children: const [
|
||||
MonthlyFragment(),
|
||||
WeeklyFragment(),
|
||||
DailyFragment(),
|
||||
],
|
||||
).expanded,
|
||||
],
|
||||
).paddingAll(16),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:test_sa/extensions/int_extensions.dart';
|
||||
import 'package:test_sa/extensions/text_extensions.dart';
|
||||
import 'package:test_sa/extensions/widget_extensions.dart';
|
||||
|
||||
import '../../../app_style/app_color.dart';
|
||||
|
||||
class CalendarHeader extends StatelessWidget {
|
||||
final DateTime dateTime;
|
||||
final DateFormat dateFormat;
|
||||
const CalendarHeader({@required this.dateTime, @required this.dateFormat, Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
dateFormat.format(dateTime).heading5(context),
|
||||
6.width,
|
||||
const Align(alignment: AlignmentDirectional.centerEnd, child: Icon(Icons.keyboard_arrow_down_sharp, color: AppColor.neutral60, size: 24)),
|
||||
const Spacer(),
|
||||
const Align(alignment: AlignmentDirectional.centerEnd, child: Icon(Icons.calendar_today, color: AppColor.neutral60, size: 18)),
|
||||
],
|
||||
),
|
||||
8.height,
|
||||
const Divider().defaultStyle(context),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:test_sa/extensions/int_extensions.dart';
|
||||
import 'package:test_sa/extensions/text_extensions.dart';
|
||||
|
||||
import '../../../app_style/app_color.dart';
|
||||
|
||||
class CalendarDaysCard extends StatelessWidget {
|
||||
final String day;
|
||||
const CalendarDaysCard({Key key, @required this.day}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bgColor = day == "1" ? AppColor.neutral30 : (day == "2" ? AppColor.primary40 : AppColor.green50).withOpacity(0.3);
|
||||
final dotColor = (day == "1"
|
||||
? Colors.transparent
|
||||
: day == "2"
|
||||
? AppColor.primary40
|
||||
: AppColor.green50);
|
||||
return SizedBox(
|
||||
height: 45.toScreenWidth,
|
||||
width: 45.toScreenWidth,
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: 37.toScreenWidth,
|
||||
width: 37.toScreenWidth,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(shape: BoxShape.circle, color: bgColor),
|
||||
child: day.bodyText(context).custom(color: AppColor.neutral50),
|
||||
),
|
||||
PositionedDirectional(
|
||||
bottom: 16.toScreenHeight,
|
||||
end: 16.toScreenWidth,
|
||||
child: CircleAvatar(backgroundColor: dotColor, radius: 2.5),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:test_sa/extensions/text_extensions.dart';
|
||||
|
||||
class DailyFragment extends StatefulWidget {
|
||||
const DailyFragment({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_DailyFragmentState createState() {
|
||||
return _DailyFragmentState();
|
||||
}
|
||||
}
|
||||
|
||||
class _DailyFragmentState extends State<DailyFragment> {
|
||||
DateTime currentDateTime = DateTime.now();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: ["Daily".heading5(context)],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:table_calendar/table_calendar.dart';
|
||||
import 'package:test_sa/extensions/int_extensions.dart';
|
||||
import 'package:test_sa/extensions/widget_extensions.dart';
|
||||
|
||||
import '../../../../extensions/text_extensions.dart';
|
||||
import '../../../app_style/app_color.dart';
|
||||
import 'calendar_header.dart';
|
||||
import 'calender_days_card.dart';
|
||||
|
||||
class MonthlyFragment extends StatefulWidget {
|
||||
const MonthlyFragment({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MonthlyFragment> createState() => _MonthlyFragmentState();
|
||||
}
|
||||
|
||||
class _MonthlyFragmentState extends State<MonthlyFragment> {
|
||||
PageController _controller;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
TableCalendar(
|
||||
firstDay: DateTime.utc(2010, 10, 16),
|
||||
lastDay: DateTime.utc(2030, 3, 14),
|
||||
focusedDay: DateTime.now(),
|
||||
calendarFormat: CalendarFormat.month,
|
||||
weekendDays: const [],
|
||||
onCalendarCreated: (controller) {
|
||||
_controller = controller;
|
||||
},
|
||||
calendarBuilders: CalendarBuilders(
|
||||
headerTitleBuilder: (context, dateTime) => CalendarHeader(dateFormat: DateFormat("MMMM, yyyy"), dateTime: dateTime),
|
||||
dowBuilder: (context, dateTime) {
|
||||
final day = DateFormat("EE").format(dateTime).toUpperCase();
|
||||
return Align(alignment: Alignment.center, child: day.bodyText(context).custom(color: AppColor.neutral50));
|
||||
},
|
||||
defaultBuilder: (context, dateTime, _) {
|
||||
final day = DateFormat("d").format(dateTime);
|
||||
return CalendarDaysCard(day: day);
|
||||
},
|
||||
),
|
||||
daysOfWeekHeight: 35.toScreenHeight,
|
||||
headerStyle: const HeaderStyle(leftChevronVisible: false, rightChevronVisible: false, formatButtonVisible: false),
|
||||
calendarStyle: CalendarStyle(
|
||||
isTodayHighlighted: false,
|
||||
defaultTextStyle: AppTextStyles.bodyText,
|
||||
defaultDecoration: const BoxDecoration(shape: BoxShape.circle, color: AppColor.neutral30),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
16.height,
|
||||
Row(
|
||||
children: [
|
||||
const CircleAvatar(backgroundColor: AppColor.primary40, radius: 8),
|
||||
8.width,
|
||||
"My Requests".heading6(context),
|
||||
],
|
||||
),
|
||||
16.height,
|
||||
Row(
|
||||
children: [
|
||||
const CircleAvatar(backgroundColor: AppColor.green50, radius: 8),
|
||||
8.width,
|
||||
"My Team Requests".heading6(context),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
).paddingOnly(start: 16, end: 16, top: 8, bottom: 8),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,102 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:table_calendar/table_calendar.dart';
|
||||
import 'package:test_sa/extensions/int_extensions.dart';
|
||||
import 'package:test_sa/extensions/text_extensions.dart';
|
||||
import 'package:test_sa/extensions/widget_extensions.dart';
|
||||
import 'package:test_sa/new_views/app_style/app_color.dart';
|
||||
|
||||
import 'calender_days_card.dart';
|
||||
|
||||
class WeeklyFragment extends StatefulWidget {
|
||||
const WeeklyFragment({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_WeeklyFragmentState createState() {
|
||||
return _WeeklyFragmentState();
|
||||
}
|
||||
}
|
||||
|
||||
class _WeeklyFragmentState extends State<WeeklyFragment> {
|
||||
DateTime currentDateTime = DateTime.now();
|
||||
PageController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
TableCalendar(
|
||||
firstDay: DateTime.utc(2010, 10, 16),
|
||||
lastDay: DateTime.utc(2030, 3, 14),
|
||||
focusedDay: DateTime.now(),
|
||||
calendarFormat: CalendarFormat.week,
|
||||
weekendDays: const [],
|
||||
onCalendarCreated: (controller) {
|
||||
_controller = controller;
|
||||
},
|
||||
calendarBuilders: CalendarBuilders(
|
||||
headerTitleBuilder: (context, dateTime) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
DateFormat("EEEE, d MMMM, yyyy").format(dateTime).heading5(context),
|
||||
8.height,
|
||||
const Divider().defaultStyle(context),
|
||||
],
|
||||
),
|
||||
dowBuilder: (context, dateTime) {
|
||||
final day = DateFormat("EE").format(dateTime).toUpperCase();
|
||||
return Align(alignment: Alignment.center, child: day.bodyText(context).custom(color: AppColor.neutral50));
|
||||
},
|
||||
defaultBuilder: (context, dateTime, _) {
|
||||
final day = DateFormat("d").format(dateTime);
|
||||
return CalendarDaysCard(day: day);
|
||||
},
|
||||
),
|
||||
daysOfWeekHeight: 35.toScreenHeight,
|
||||
headerStyle: const HeaderStyle(leftChevronVisible: false, rightChevronVisible: false, formatButtonVisible: false),
|
||||
calendarStyle: CalendarStyle(
|
||||
isTodayHighlighted: false,
|
||||
defaultTextStyle: AppTextStyles.bodyText,
|
||||
defaultDecoration: const BoxDecoration(shape: BoxShape.circle, color: AppColor.neutral30),
|
||||
),
|
||||
),
|
||||
// TableCalendar(
|
||||
// headerVisible: false,
|
||||
// calendarFormat: CalendarFormat.week,
|
||||
// firstDay: DateTime.utc(2010, 10, 16),
|
||||
// lastDay: DateTime.utc(2030, 3, 14),
|
||||
// focusedDay: currentDateTime,
|
||||
// currentDay: currentDateTime,
|
||||
// rowHeight: 37,
|
||||
// calendarStyle: CalendarStyle(
|
||||
// todayDecoration: cellDecoration(),
|
||||
// todayTextStyle: AppTextStyles.bodyText.copyWith(color: const Color(0xFF2B353E)),
|
||||
// selectedTextStyle: AppTextStyles.bodyText.copyWith(color: const Color(0xFF2B353E)),
|
||||
// rangeStartTextStyle: AppTextStyles.bodyText.copyWith(color: const Color(0xFF2B353E)),
|
||||
// rangeEndTextStyle: AppTextStyles.bodyText.copyWith(color: const Color(0xFF2B353E)),
|
||||
// ),
|
||||
// daysOfWeekStyle: DaysOfWeekStyle(
|
||||
// weekdayStyle: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50),
|
||||
// weekendStyle: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50),
|
||||
// ),
|
||||
// availableGestures: AvailableGestures.none,
|
||||
// ),
|
||||
],
|
||||
).toShadowContainer,
|
||||
);
|
||||
}
|
||||
|
||||
BoxDecoration cellDecoration({Color color}) => BoxDecoration(color: color ?? Colors.transparent, shape: BoxShape.circle);
|
||||
}
|
||||
@ -0,0 +1,145 @@
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:table_calendar/table_calendar.dart';
|
||||
// import 'package:test_sa/extensions/int_extensions.dart';
|
||||
// import 'package:test_sa/extensions/text_extensions.dart';
|
||||
// import 'package:test_sa/extensions/widget_extensions.dart';
|
||||
// import 'package:test_sa/new_views/app_style/app_color.dart';
|
||||
// import 'package:test_sa/new_views/pages/land_page/calender_fragments/monthly_fragment.dart';
|
||||
// import 'package:test_sa/new_views/pages/land_page/calender_fragments/weekly_fragment.dart';
|
||||
//
|
||||
// class CalenderPage extends StatefulWidget {
|
||||
// CalenderPage({Key key}) : super(key: key);
|
||||
//
|
||||
// @override
|
||||
// _CalenderPageState createState() {
|
||||
// return _CalenderPageState();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class _CalenderPageState extends State<CalenderPage> {
|
||||
// int selectedIndex = 0;
|
||||
// DateTime currentDateTime = DateTime.now();
|
||||
//
|
||||
// PageController _pageController;
|
||||
//
|
||||
// @override
|
||||
// void initState() {
|
||||
// _pageController = PageController();
|
||||
// super.initState();
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// void dispose() {
|
||||
// _pageController.dispose();
|
||||
// super.dispose();
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Scaffold(
|
||||
// body: Column(
|
||||
// children: [
|
||||
// // todo @sikander, hiding My shift view, later when they add data, then will us it.
|
||||
// Container(
|
||||
// width: double.infinity,
|
||||
// padding: const EdgeInsets.all(16),
|
||||
// decoration: ShapeDecoration(
|
||||
// color: Colors.white,
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(20),
|
||||
// ),
|
||||
// shadows: const [
|
||||
// BoxShadow(
|
||||
// color: Color(0x07000000),
|
||||
// blurRadius: 14,
|
||||
// offset: Offset(0, 0),
|
||||
// spreadRadius: 0,
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// Text(
|
||||
// 'My Shift',
|
||||
// style: AppTextStyles.heading5.copyWith(color: AppColor.neutral50),
|
||||
// ),
|
||||
// 8.height,
|
||||
// Text(
|
||||
// 'Sunday to Thursday',
|
||||
// style: AppTextStyles.bodyText.copyWith(color: const Color(0xFF757575)),
|
||||
// ),
|
||||
// Text(
|
||||
// '09:00 to 18:00',
|
||||
// style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
//
|
||||
// Container(
|
||||
// width: double.infinity,
|
||||
// padding: const EdgeInsets.all(4),
|
||||
// decoration: ShapeDecoration(
|
||||
// color: const Color(0xFFEAF1F4),
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(16),
|
||||
// ),
|
||||
// shadows: const [
|
||||
// BoxShadow(
|
||||
// color: Color(0x07000000),
|
||||
// blurRadius: 14,
|
||||
// offset: Offset(0, 0),
|
||||
// spreadRadius: 0,
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// tabItem("Monthly", 0, selectedIndex, () => onTabPress(0)),
|
||||
// tabItem("Weekly", 1, selectedIndex, () => onTabPress(1)),
|
||||
// tabItem("Daily", 2, selectedIndex, () => onTabPress(2)),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// 8.height,
|
||||
// PageView(
|
||||
// controller: _pageController,
|
||||
// onPageChanged: (index) => onTabPress(index),
|
||||
// children: [
|
||||
// MonthlyFragment(),
|
||||
// WeeklyFragment(),
|
||||
// Container(),
|
||||
// ],
|
||||
// ).expanded,
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// void onTabPress(index) {
|
||||
// if (selectedIndex != index) {
|
||||
// setState(() {
|
||||
// selectedIndex = index;
|
||||
// });
|
||||
// _pageController.jumpToPage(index);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Widget tabItem(String title, int index, int selectedIndex, VoidCallback onPress) {
|
||||
// return Container(
|
||||
// alignment: Alignment.center,
|
||||
// padding: const EdgeInsets.only(top: 14, bottom: 14),
|
||||
// decoration: ShapeDecoration(
|
||||
// color: index == selectedIndex ? Colors.white : Colors.transparent,
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(13),
|
||||
// ),
|
||||
// ),
|
||||
// child: Text(
|
||||
// title,
|
||||
// style: AppTextStyles.bodyText.copyWith(color: index == selectedIndex ? AppColor.neutral60 : const Color(0xFF757575)),
|
||||
// )).onPress(onPress).expanded;
|
||||
// }
|
||||
// }
|
||||
@ -1,11 +1,54 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:pie_chart/pie_chart.dart';
|
||||
import 'package:test_sa/extensions/int_extensions.dart';
|
||||
import 'package:test_sa/extensions/text_extensions.dart';
|
||||
import 'package:test_sa/extensions/widget_extensions.dart';
|
||||
import 'package:test_sa/new_views/app_style/app_color.dart';
|
||||
import 'package:test_sa/views/app_style/colors.dart';
|
||||
|
||||
class ProgressFragment extends StatelessWidget {
|
||||
ProgressFragment({Key key}) : super(key: key);
|
||||
const ProgressFragment({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// TODO: implement build
|
||||
return Container();
|
||||
const Map<String, double> statuses = {
|
||||
"Completed": 12,
|
||||
"In Progress": 12,
|
||||
"Open": 12,
|
||||
};
|
||||
return Column(
|
||||
children: [
|
||||
Card(
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
PieChart(
|
||||
dataMap: statuses,
|
||||
animationDuration: const Duration(milliseconds: 800),
|
||||
chartRadius: 190.toScreenWidth,
|
||||
colorList: [AColors.statusGreen, AColors.statusBlue, AColors.statusYellowLight],
|
||||
initialAngleInDegree: 270,
|
||||
chartType: ChartType.ring,
|
||||
ringStrokeWidth: 40.toScreenWidth,
|
||||
legendOptions: const LegendOptions(showLegends: false),
|
||||
chartValuesOptions: ChartValuesOptions(
|
||||
chartValueBackgroundColor: Colors.transparent,
|
||||
chartValueStyle: AppTextStyles.heading6.copyWith(color: AppColor.neutral20),
|
||||
showChartValuesOutside: true,
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
"Total".heading5(context),
|
||||
"20".heading6(context).custom(color: AppColor.neutral20),
|
||||
],
|
||||
)
|
||||
],
|
||||
).paddingAll(23),
|
||||
),
|
||||
],
|
||||
).paddingOnly(start: 16, end: 16);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue