feat: add profile and setting screen
This commit is contained in:
parent
9e9cc57e54
commit
d7a802b244
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class AppColor {
|
class AppColor {
|
||||||
|
static const Color backgroundColor = Color(0xFFF7F8F8);
|
||||||
static const Color primary = Color(0xFF227267);
|
static const Color primary = Color(0xFF227267);
|
||||||
static const Color darkGreen = Color(0xFF16423C);
|
static const Color darkGreen = Color(0xFF16423C);
|
||||||
static const Color secondary = Color(0xFF399C8F);
|
static const Color secondary = Color(0xFF399C8F);
|
||||||
|
|
|
||||||
0
agrilink_vocpro/lib/domain/service/service.dart
Normal file
0
agrilink_vocpro/lib/domain/service/service.dart
Normal file
|
|
@ -1,6 +1,8 @@
|
||||||
import 'package:agrilink_vocpro/core/constant/app_theme.dart';
|
import 'package:agrilink_vocpro/core/constant/app_theme.dart';
|
||||||
import 'package:agrilink_vocpro/features/control/provider/control_provider.dart';
|
import 'package:agrilink_vocpro/features/control/provider/control_provider.dart';
|
||||||
|
import 'package:agrilink_vocpro/features/home/widgets/graphic_widget.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class ControlScreen extends StatelessWidget {
|
class ControlScreen extends StatelessWidget {
|
||||||
|
|
@ -20,7 +22,7 @@ class ControlScreen extends StatelessWidget {
|
||||||
child: ListView(
|
child: ListView(
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: const Text('Control 1'),
|
title: Text('Control 1', style: AppTheme.labelMedium),
|
||||||
subtitle: const Text('Control 1 description'),
|
subtitle: const Text('Control 1 description'),
|
||||||
trailing: Switch(
|
trailing: Switch(
|
||||||
value: provider.control_1,
|
value: provider.control_1,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:agrilink_vocpro/features/control/view/control_screen.dart';
|
import 'package:agrilink_vocpro/features/control/view/control_screen.dart';
|
||||||
import 'package:agrilink_vocpro/features/home/view/home_screen.dart';
|
import 'package:agrilink_vocpro/features/home/view/home_screen.dart';
|
||||||
import 'package:agrilink_vocpro/features/plants/view/plants_screen.dart';
|
import 'package:agrilink_vocpro/features/plants/view/plants_screen.dart';
|
||||||
|
import 'package:agrilink_vocpro/features/setting/view/setting_screen.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class DashboardProvider extends ChangeNotifier {
|
class DashboardProvider extends ChangeNotifier {
|
||||||
|
|
@ -18,7 +19,7 @@ class DashboardProvider extends ChangeNotifier {
|
||||||
const HomeScreen(),
|
const HomeScreen(),
|
||||||
const ControlScreen(),
|
const ControlScreen(),
|
||||||
const PlantsScreen(),
|
const PlantsScreen(),
|
||||||
const Center(child: Text('Settings')),
|
const SettingScreen(),
|
||||||
];
|
];
|
||||||
|
|
||||||
List<Widget> get screens => _screens;
|
List<Widget> get screens => _screens;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:agrilink_vocpro/core/constant/app_theme.dart';
|
import 'package:agrilink_vocpro/core/constant/app_theme.dart';
|
||||||
import 'package:agrilink_vocpro/features/home/pages/humidity/widgets/circle_chart.dart';
|
import 'package:agrilink_vocpro/features/home/pages/humidity/widgets/circle_chart.dart';
|
||||||
import 'package:agrilink_vocpro/features/home/provider/home_provider.dart';
|
import 'package:agrilink_vocpro/features/home/provider/home_provider.dart';
|
||||||
|
import 'package:agrilink_vocpro/features/home/widgets/graphic_widget.dart';
|
||||||
import 'package:bootstrap_icons/bootstrap_icons.dart';
|
import 'package:bootstrap_icons/bootstrap_icons.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
@ -66,9 +67,25 @@ class HumidityScreen extends StatelessWidget {
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: 16.w),
|
padding: EdgeInsets.only(left: 16.w),
|
||||||
child: const Text('Deskripsi'),
|
child: const Text('Grafik dalam 7 hari terakhir'),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
AspectRatio(
|
||||||
|
aspectRatio: 2.h,
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 16.w),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(16.w),
|
||||||
|
border: Border.all(
|
||||||
|
color: Colors.grey.shade300, width: 1.w)),
|
||||||
|
child: const GarphicWidget()),
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.h),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 16.w),
|
||||||
|
child: const Text('Deskripsi'),
|
||||||
|
),
|
||||||
ListView.builder(
|
ListView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
|
@ -90,10 +107,10 @@ class HumidityScreen extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.description,
|
item.description,
|
||||||
style: AppTheme.hintStyle,
|
style: AppTheme.labelMedium,
|
||||||
),
|
),
|
||||||
SizedBox(height: 8.h),
|
SizedBox(height: 8.h),
|
||||||
Text('Tindakan', style: AppTheme.labelMedium),
|
Text('Tindakan', style: AppTheme.labelSmall),
|
||||||
SizedBox(height: 8.h),
|
SizedBox(height: 8.h),
|
||||||
Text(item.action),
|
Text(item.action),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:agrilink_vocpro/core/constant/app_theme.dart';
|
import 'package:agrilink_vocpro/core/constant/app_theme.dart';
|
||||||
|
import 'package:agrilink_vocpro/features/home/widgets/graphic_widget.dart';
|
||||||
import 'package:bootstrap_icons/bootstrap_icons.dart';
|
import 'package:bootstrap_icons/bootstrap_icons.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
@ -41,20 +42,12 @@ class LightScreen extends StatelessWidget {
|
||||||
child: Stack(
|
child: Stack(
|
||||||
fit: StackFit.expand,
|
fit: StackFit.expand,
|
||||||
children: [
|
children: [
|
||||||
Center(
|
const Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const Icon(BootstrapIcons.sun,
|
Icon(BootstrapIcons.sun,
|
||||||
size: 32, color: Colors.orange),
|
size: 32, color: Colors.orange),
|
||||||
Text(
|
|
||||||
'${value.toStringAsFixed(0)} lux', // Animated percentage text
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 28,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -65,10 +58,10 @@ class LightScreen extends StatelessWidget {
|
||||||
axis: GaugeAxis(
|
axis: GaugeAxis(
|
||||||
degrees: 360,
|
degrees: 360,
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 5000,
|
max: 1000,
|
||||||
style: GaugeAxisStyle(
|
style: GaugeAxisStyle(
|
||||||
background: Colors.grey.shade100,
|
background: Colors.grey.shade100,
|
||||||
thickness: 50,
|
thickness: 100,
|
||||||
),
|
),
|
||||||
progressBar: GaugeBasicProgressBar(
|
progressBar: GaugeBasicProgressBar(
|
||||||
gradient: GaugeAxisGradient(colors: [
|
gradient: GaugeAxisGradient(colors: [
|
||||||
|
|
@ -82,6 +75,15 @@ class LightScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
Text(
|
||||||
|
'${value.toStringAsFixed(0)} lux',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 28,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
|
@ -99,8 +101,18 @@ class LightScreen extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.h),
|
SizedBox(height: 16.h),
|
||||||
const Text('Deskripsi'),
|
const Text('Grafik'),
|
||||||
SizedBox(height: 16.h),
|
SizedBox(height: 16.h),
|
||||||
|
AspectRatio(
|
||||||
|
aspectRatio: 1.5.h,
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: Colors.grey.shade300, width: 1.w),
|
||||||
|
borderRadius: BorderRadius.circular(16.w),
|
||||||
|
),
|
||||||
|
child: const GarphicWidget(),
|
||||||
|
),
|
||||||
|
)
|
||||||
// Row(
|
// Row(
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
// children: [
|
// children: [
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:agrilink_vocpro/core/constant/app_theme.dart';
|
import 'package:agrilink_vocpro/core/constant/app_theme.dart';
|
||||||
|
import 'package:agrilink_vocpro/features/home/widgets/graphic_widget.dart';
|
||||||
import 'package:bootstrap_icons/bootstrap_icons.dart';
|
import 'package:bootstrap_icons/bootstrap_icons.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
@ -100,8 +101,6 @@ class TemperatureScreen extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.h),
|
SizedBox(height: 16.h),
|
||||||
const Text('Deskripsi'),
|
|
||||||
SizedBox(height: 16.h),
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -199,6 +198,20 @@ class TemperatureScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.h),
|
||||||
|
const Text('Grafik'),
|
||||||
|
SizedBox(height: 16.h),
|
||||||
|
AspectRatio(
|
||||||
|
aspectRatio: 1.6.h,
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(16.w),
|
||||||
|
border: Border.all(color: Colors.grey.shade300, width: 1.w),
|
||||||
|
),
|
||||||
|
child: const GarphicWidget(),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
toolbarHeight: 200.h,
|
toolbarHeight: 200.h,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: AppColor.backgroundColor,
|
||||||
scrolledUnderElevation: 0,
|
scrolledUnderElevation: 0,
|
||||||
flexibleSpace: Padding(
|
flexibleSpace: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||||
|
|
|
||||||
191
agrilink_vocpro/lib/features/home/widgets/graphic_widget.dart
Normal file
191
agrilink_vocpro/lib/features/home/widgets/graphic_widget.dart
Normal file
|
|
@ -0,0 +1,191 @@
|
||||||
|
import 'package:agrilink_vocpro/core/constant/app_color.dart';
|
||||||
|
import 'package:fl_chart/fl_chart.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class GarphicWidget extends StatelessWidget {
|
||||||
|
const GarphicWidget({super.key, thi});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BarChart(
|
||||||
|
BarChartData(
|
||||||
|
barTouchData: barTouchData,
|
||||||
|
titlesData: titlesData,
|
||||||
|
borderData: borderData,
|
||||||
|
barGroups: barGroups,
|
||||||
|
gridData: const FlGridData(show: false),
|
||||||
|
alignment: BarChartAlignment.spaceAround,
|
||||||
|
maxY: 20,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BarTouchData get barTouchData => BarTouchData(
|
||||||
|
enabled: false,
|
||||||
|
touchTooltipData: BarTouchTooltipData(
|
||||||
|
getTooltipColor: (group) => Colors.transparent,
|
||||||
|
tooltipPadding: EdgeInsets.zero,
|
||||||
|
tooltipMargin: 8,
|
||||||
|
getTooltipItem: (
|
||||||
|
BarChartGroupData group,
|
||||||
|
int groupIndex,
|
||||||
|
BarChartRodData rod,
|
||||||
|
int rodIndex,
|
||||||
|
) {
|
||||||
|
return BarTooltipItem(
|
||||||
|
rod.toY.round().toString(),
|
||||||
|
const TextStyle(
|
||||||
|
color: AppColor.textDark,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget getTitles(double value, TitleMeta meta) {
|
||||||
|
const style = TextStyle(
|
||||||
|
color: AppColor.textDark,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 14,
|
||||||
|
);
|
||||||
|
String text;
|
||||||
|
switch (value.toInt()) {
|
||||||
|
case 0:
|
||||||
|
text = 'Mon';
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
text = 'Tue';
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
text = 'Wed';
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
text = 'Thu';
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
text = 'Fri';
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
text = 'Sat';
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
text = 'Sun';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
text = '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return SideTitleWidget(
|
||||||
|
axisSide: meta.axisSide,
|
||||||
|
space: 4,
|
||||||
|
child: Text(text, style: style),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
FlTitlesData get titlesData => const FlTitlesData(
|
||||||
|
show: true,
|
||||||
|
bottomTitles: AxisTitles(
|
||||||
|
sideTitles: SideTitles(
|
||||||
|
showTitles: true,
|
||||||
|
reservedSize: 30,
|
||||||
|
getTitlesWidget: getTitles,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
leftTitles: AxisTitles(
|
||||||
|
sideTitles: SideTitles(showTitles: false),
|
||||||
|
),
|
||||||
|
topTitles: AxisTitles(
|
||||||
|
sideTitles: SideTitles(showTitles: false),
|
||||||
|
),
|
||||||
|
rightTitles: AxisTitles(
|
||||||
|
sideTitles: SideTitles(showTitles: false),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
FlBorderData get borderData => FlBorderData(
|
||||||
|
show: false,
|
||||||
|
);
|
||||||
|
|
||||||
|
LinearGradient get _barsGradient => const LinearGradient(
|
||||||
|
colors: [
|
||||||
|
AppColor.secondary,
|
||||||
|
AppColor.ternary,
|
||||||
|
],
|
||||||
|
begin: Alignment.bottomCenter,
|
||||||
|
end: Alignment.topCenter,
|
||||||
|
);
|
||||||
|
|
||||||
|
List<BarChartGroupData> get barGroups => [
|
||||||
|
BarChartGroupData(
|
||||||
|
x: 0,
|
||||||
|
barRods: [
|
||||||
|
BarChartRodData(
|
||||||
|
toY: 8,
|
||||||
|
gradient: _barsGradient,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
showingTooltipIndicators: [0],
|
||||||
|
),
|
||||||
|
BarChartGroupData(
|
||||||
|
x: 1,
|
||||||
|
barRods: [
|
||||||
|
BarChartRodData(
|
||||||
|
toY: 10,
|
||||||
|
gradient: _barsGradient,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
showingTooltipIndicators: [0],
|
||||||
|
),
|
||||||
|
BarChartGroupData(
|
||||||
|
x: 2,
|
||||||
|
barRods: [
|
||||||
|
BarChartRodData(
|
||||||
|
toY: 14,
|
||||||
|
gradient: _barsGradient,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
showingTooltipIndicators: [0],
|
||||||
|
),
|
||||||
|
BarChartGroupData(
|
||||||
|
x: 3,
|
||||||
|
barRods: [
|
||||||
|
BarChartRodData(
|
||||||
|
toY: 15,
|
||||||
|
gradient: _barsGradient,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
showingTooltipIndicators: [0],
|
||||||
|
),
|
||||||
|
BarChartGroupData(
|
||||||
|
x: 4,
|
||||||
|
barRods: [
|
||||||
|
BarChartRodData(
|
||||||
|
toY: 13,
|
||||||
|
gradient: _barsGradient,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
showingTooltipIndicators: [0],
|
||||||
|
),
|
||||||
|
BarChartGroupData(
|
||||||
|
x: 5,
|
||||||
|
barRods: [
|
||||||
|
BarChartRodData(
|
||||||
|
toY: 10,
|
||||||
|
gradient: _barsGradient,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
showingTooltipIndicators: [0],
|
||||||
|
),
|
||||||
|
BarChartGroupData(
|
||||||
|
x: 6,
|
||||||
|
barRods: [
|
||||||
|
BarChartRodData(
|
||||||
|
toY: 16,
|
||||||
|
gradient: _barsGradient,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
showingTooltipIndicators: [0],
|
||||||
|
),
|
||||||
|
];
|
||||||
152
agrilink_vocpro/lib/features/setting/view/setting_screen.dart
Normal file
152
agrilink_vocpro/lib/features/setting/view/setting_screen.dart
Normal file
|
|
@ -0,0 +1,152 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:agrilink_vocpro/core/constant/app_color.dart';
|
||||||
|
import 'package:agrilink_vocpro/core/constant/app_theme.dart';
|
||||||
|
import 'package:bootstrap_icons/bootstrap_icons.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
||||||
|
class SettingScreen extends StatelessWidget {
|
||||||
|
const SettingScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text('Setting', style: AppTheme.labelMedium),
|
||||||
|
centerTitle: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
scrolledUnderElevation: 0,
|
||||||
|
),
|
||||||
|
body: SafeArea(
|
||||||
|
child: ListView(
|
||||||
|
padding: EdgeInsets.all(16.r),
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
const CircleAvatar(
|
||||||
|
radius: 30,
|
||||||
|
backgroundColor: AppColor.secondary,
|
||||||
|
child: Icon(BootstrapIcons.person_fill, color: Colors.white),
|
||||||
|
),
|
||||||
|
SizedBox(width: 8.w),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('User Name', style: AppTheme.labelMedium),
|
||||||
|
Text('useremail@gmail.com', style: AppTheme.labelSmall)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.h),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(8.r),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
ListTile(
|
||||||
|
tileColor: Colors.white,
|
||||||
|
title: Text('Account',
|
||||||
|
style:
|
||||||
|
AppTheme.labelSmall.copyWith(color: Colors.black87)),
|
||||||
|
leading: const Icon(BootstrapIcons.person),
|
||||||
|
trailing: Icon(
|
||||||
|
Icons.arrow_forward_ios,
|
||||||
|
size: 16.r,
|
||||||
|
),
|
||||||
|
onTap: () {},
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
tileColor: Colors.white,
|
||||||
|
title: Text('Kebijakan & privasi',
|
||||||
|
style:
|
||||||
|
AppTheme.labelSmall.copyWith(color: Colors.black87)),
|
||||||
|
leading: const Icon(BootstrapIcons.shield_check),
|
||||||
|
trailing: Icon(
|
||||||
|
Icons.arrow_forward_ios,
|
||||||
|
size: 16.r,
|
||||||
|
),
|
||||||
|
onTap: () {},
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
tileColor: Colors.white,
|
||||||
|
title: Text('Syarat & ketentuan',
|
||||||
|
style:
|
||||||
|
AppTheme.labelSmall.copyWith(color: Colors.black87)),
|
||||||
|
leading: const Icon(BootstrapIcons.file_text),
|
||||||
|
trailing: Icon(
|
||||||
|
Icons.arrow_forward_ios,
|
||||||
|
size: 16.r,
|
||||||
|
),
|
||||||
|
onTap: () {},
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
tileColor: Colors.white,
|
||||||
|
title: Text('Logout',
|
||||||
|
style: AppTheme.labelSmall.copyWith(color: Colors.red)),
|
||||||
|
leading: const Icon(
|
||||||
|
BootstrapIcons.box_arrow_right,
|
||||||
|
color: Colors.red,
|
||||||
|
),
|
||||||
|
trailing: Icon(
|
||||||
|
Icons.arrow_forward_ios,
|
||||||
|
size: 16.r,
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AlertDialog(
|
||||||
|
title: Text('Logout'),
|
||||||
|
content: Text('Apakah anda yakin ingin logout?'),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
child: Text('Batal'),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
child: Text('Ya'),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => CupertinoAlertDialog(
|
||||||
|
title: Text('Logout'),
|
||||||
|
content: Text('Apakah anda yakin ingin logout?'),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
child: Text('Batal'),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
child: Text('Ya'),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:agrilink_vocpro/core/constant/app_color.dart';
|
||||||
import 'package:agrilink_vocpro/core/route/app_route.dart';
|
import 'package:agrilink_vocpro/core/route/app_route.dart';
|
||||||
import 'package:agrilink_vocpro/features/auth/provider/auth_provider.dart';
|
import 'package:agrilink_vocpro/features/auth/provider/auth_provider.dart';
|
||||||
import 'package:agrilink_vocpro/features/control/provider/control_provider.dart';
|
import 'package:agrilink_vocpro/features/control/provider/control_provider.dart';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user