merge issue fix
This commit is contained in:
parent
9f5ef6153d
commit
7761c6b19a
@ -1,6 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="main.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
|
||||
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
|
||||
<option name="filePath" value="$PROJECT_DIR$/frontend/lib/main.dart" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@ -901,8 +901,7 @@ class ChartWidget extends StatelessWidget {
|
||||
child: BarChart(
|
||||
BarChartData(
|
||||
maxY: 400000,
|
||||
rotationQuarterTurns:
|
||||
rotationTurns, // Adjust maxY as needed based on your data
|
||||
rotationQuarterTurns: rotationTurns,
|
||||
barTouchData: BarTouchData(
|
||||
touchTooltipData: BarTouchTooltipData(
|
||||
tooltipHorizontalAlignment: FLHorizontalAlignment.center,
|
||||
|
||||
@ -59,7 +59,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
final GlobalKey bottomNavKey = GlobalKey();
|
||||
final GlobalKey toggleKey = GlobalKey();
|
||||
final GlobalKey drawerKey = GlobalKey();
|
||||
late double toggleHeight=0;
|
||||
late double toggleHeight = 0;
|
||||
bool isLoggedOut = false;
|
||||
|
||||
@override
|
||||
@ -70,6 +70,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
_startAppbarTour();
|
||||
});
|
||||
}
|
||||
|
||||
//Method to Start App Tour
|
||||
void _startAppbarTour() {
|
||||
final scaffoldProvider = ref.watch(scaffoldTourProvider);
|
||||
@ -89,11 +90,11 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
},
|
||||
)..show(context: context);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void _calculatetooglePosition() {
|
||||
final RenderBox cardRenderBox = toggleKey.currentContext!.findRenderObject() as RenderBox;
|
||||
final RenderBox cardRenderBox =
|
||||
toggleKey.currentContext!.findRenderObject() as RenderBox;
|
||||
final Offset cardPosition = cardRenderBox.localToGlobal(Offset.zero);
|
||||
final Size cardSize = cardRenderBox.size;
|
||||
toggleHeight = cardSize.height;
|
||||
@ -102,18 +103,18 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
void handleSkip() {
|
||||
tutorialCoachMark.skip();
|
||||
debugPrint('Skip clicked');
|
||||
ref.read(chartsTourProvider.notifier).state = true;
|
||||
ref.read(previousChartsTourProvider.notifier).state = true;
|
||||
ref.read(homeTourProvider.notifier).state = true;
|
||||
ref.read( previousHomeTourProvider.notifier).state = true;
|
||||
ref.read(chartsTourProvider.notifier).state = true;
|
||||
ref.read(previousChartsTourProvider.notifier).state = true;
|
||||
ref.read(homeTourProvider.notifier).state = true;
|
||||
ref.read(previousHomeTourProvider.notifier).state = true;
|
||||
ref.read(scaffoldTourProvider.notifier).state = true;
|
||||
ref.read(previousScaffoldTourProvider.notifier).state = true;
|
||||
}
|
||||
|
||||
void _initTarget(){
|
||||
final double screenWidth= MediaQuery.of(context).size.width;
|
||||
final double screenHeight= MediaQuery.of(context).size.height;
|
||||
appBarTargets=[
|
||||
void _initTarget() {
|
||||
final double screenWidth = MediaQuery.of(context).size.width;
|
||||
final double screenHeight = MediaQuery.of(context).size.height;
|
||||
appBarTargets = [
|
||||
TargetFocus(
|
||||
identify: 'bottomNav',
|
||||
keyTarget: bottomNavKey,
|
||||
@ -124,14 +125,13 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
alignment: ContentAlign.top,
|
||||
space: 0,
|
||||
gap: 100,
|
||||
|
||||
),
|
||||
TargetContent(
|
||||
align: ContentAlign.top,
|
||||
child:
|
||||
SizedBox(
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.of(context).size.height* 0.30, // Set an appropriate height for the Stack
|
||||
height: MediaQuery.of(context).size.height *
|
||||
0.30, // Set an appropriate height for the Stack
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
@ -142,7 +142,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ElevatedButton(
|
||||
onPressed: () =>handleSkip(),
|
||||
onPressed: () => handleSkip(),
|
||||
style: ElevatedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@ -174,14 +174,21 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: Colors.white, width: 2.0),
|
||||
border: Border.all(
|
||||
color: Colors.white, width: 2.0),
|
||||
),
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: Colors.white),
|
||||
icon: const Icon(Icons.arrow_back,
|
||||
color: Colors.white),
|
||||
onPressed: () {
|
||||
tutorialCoachMark.finish();
|
||||
ref.read(scaffoldTourProvider.notifier).state=true;
|
||||
ref.read(previousChartsTourProvider.notifier).state=false;
|
||||
ref
|
||||
.read(scaffoldTourProvider.notifier)
|
||||
.state = true;
|
||||
ref
|
||||
.read(previousChartsTourProvider
|
||||
.notifier)
|
||||
.state = false;
|
||||
context.push('/marriages');
|
||||
},
|
||||
),
|
||||
@ -191,10 +198,12 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFF7DAFBC),
|
||||
border: Border.all(color: Color(0xFF7DAFBC), width: 1.5),
|
||||
border: Border.all(
|
||||
color: Color(0xFF7DAFBC), width: 1.5),
|
||||
),
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.arrow_forward, color: Colors.white),
|
||||
icon: const Icon(Icons.arrow_forward,
|
||||
color: Colors.white),
|
||||
onPressed: () {
|
||||
tutorialCoachMark.next();
|
||||
},
|
||||
@ -212,7 +221,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
),
|
||||
),
|
||||
TargetContent(
|
||||
padding: EdgeInsets.only(left:screenWidth*0.4, bottom: 0 ),
|
||||
padding: EdgeInsets.only(left: screenWidth * 0.4, bottom: 0),
|
||||
align: ContentAlign.top,
|
||||
child: Container(
|
||||
width: 200,
|
||||
@ -223,7 +232,6 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
'assets/app_tour/leftUp.png',
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -245,10 +253,10 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
),
|
||||
TargetContent(
|
||||
align: ContentAlign.bottom,
|
||||
child:
|
||||
SizedBox(
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.of(context).size.height* 0.80, // Set an appropriate height for the Stack
|
||||
height: MediaQuery.of(context).size.height *
|
||||
0.80, // Set an appropriate height for the Stack
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
@ -259,7 +267,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ElevatedButton(
|
||||
onPressed: () =>handleSkip(),
|
||||
onPressed: () => handleSkip(),
|
||||
style: ElevatedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@ -291,10 +299,12 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: Colors.white, width: 2.0),
|
||||
border: Border.all(
|
||||
color: Colors.white, width: 2.0),
|
||||
),
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: Colors.white),
|
||||
icon: const Icon(Icons.arrow_back,
|
||||
color: Colors.white),
|
||||
onPressed: () {
|
||||
tutorialCoachMark.previous();
|
||||
},
|
||||
@ -305,10 +315,12 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFF7DAFBC),
|
||||
border: Border.all(color: Color(0xFF7DAFBC), width: 1),
|
||||
border: Border.all(
|
||||
color: Color(0xFF7DAFBC), width: 1),
|
||||
),
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.arrow_forward, color: Colors.white),
|
||||
icon: const Icon(Icons.arrow_forward,
|
||||
color: Colors.white),
|
||||
onPressed: () {
|
||||
tutorialCoachMark.next();
|
||||
},
|
||||
@ -326,11 +338,12 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
),
|
||||
),
|
||||
TargetContent(
|
||||
padding: EdgeInsets.only(right: screenWidth*0.7, top: toggleHeight-5),
|
||||
padding: EdgeInsets.only(
|
||||
right: screenWidth * 0.7, top: toggleHeight - 5),
|
||||
align: ContentAlign.right,
|
||||
child: Container(
|
||||
width: 200,
|
||||
height: screenHeight/4,
|
||||
height: screenHeight / 4,
|
||||
child: Stack(
|
||||
children: [
|
||||
Image.asset(
|
||||
@ -360,7 +373,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
keyTarget: toggleKey,
|
||||
shape: ShapeLightFocus.RRect,
|
||||
radius: 0,
|
||||
paddingFocus: 0,// Rounded rectangle highlight
|
||||
paddingFocus: 0, // Rounded rectangle highlight
|
||||
contents: [
|
||||
createTargetContent(
|
||||
text: AppLocalizations.of(context)!.toggle,
|
||||
@ -370,10 +383,9 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
),
|
||||
TargetContent(
|
||||
align: ContentAlign.bottom,
|
||||
child:
|
||||
SizedBox(
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.of(context).size.height* 0.80,
|
||||
height: MediaQuery.of(context).size.height * 0.80,
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
@ -416,26 +428,40 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: Colors.white, width: 2.0),
|
||||
border: Border.all(
|
||||
color: Colors.white, width: 2.0),
|
||||
),
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: Colors.white),
|
||||
icon: const Icon(Icons.arrow_back,
|
||||
color: Colors.white),
|
||||
onPressed: () {
|
||||
tutorialCoachMark.previous();
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
debugPrint('Got it clicked');
|
||||
ref.read(chartsTourProvider.notifier).state = true;
|
||||
ref.read(previousChartsTourProvider.notifier).state = true;
|
||||
ref.read(homeTourProvider.notifier).state = true;
|
||||
ref.read( previousHomeTourProvider.notifier).state = true;
|
||||
ref.read(scaffoldTourProvider.notifier).state = true;
|
||||
ref.read(previousScaffoldTourProvider.notifier).state = true;
|
||||
ref
|
||||
.read(chartsTourProvider.notifier)
|
||||
.state = true;
|
||||
ref
|
||||
.read(
|
||||
previousChartsTourProvider.notifier)
|
||||
.state = true;
|
||||
ref.read(homeTourProvider.notifier).state =
|
||||
true;
|
||||
ref
|
||||
.read(previousHomeTourProvider.notifier)
|
||||
.state = true;
|
||||
ref
|
||||
.read(scaffoldTourProvider.notifier)
|
||||
.state = true;
|
||||
ref
|
||||
.read(previousScaffoldTourProvider
|
||||
.notifier)
|
||||
.state = true;
|
||||
tutorialCoachMark.finish();
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
@ -466,11 +492,12 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
),
|
||||
),
|
||||
TargetContent(
|
||||
padding: EdgeInsets.only(left:screenWidth*0.7, top: toggleHeight),
|
||||
padding:
|
||||
EdgeInsets.only(left: screenWidth * 0.7, top: toggleHeight),
|
||||
align: ContentAlign.left,
|
||||
child: Container(
|
||||
width: 200,
|
||||
height: screenHeight/4,
|
||||
height: screenHeight / 4,
|
||||
child: Stack(
|
||||
children: [
|
||||
Image.asset(
|
||||
@ -615,7 +642,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
child: Builder(
|
||||
builder: (BuildContext context) {
|
||||
return IconButton(
|
||||
key:drawerKey,
|
||||
key: drawerKey,
|
||||
color: (widget.showBackButton == true)
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
@ -651,7 +678,9 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
),
|
||||
Divider(),
|
||||
InkWell(
|
||||
onTap: () { if(userId != 'guest')context.go('/editProfile');},
|
||||
onTap: () {
|
||||
if (userId != 'guest') context.go('/editProfile');
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
@ -684,12 +713,15 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
children: [
|
||||
// Text(userId ?? 'Loading user...'), // Display userId here
|
||||
// Text('Mohammad@fcsc.com')
|
||||
if(userId == "guest")...[ Text(userName ?? 'Guest User'),]
|
||||
else...[Text(userName ?? 'Loading...'),
|
||||
Text(
|
||||
userEmail ?? 'Loading...',
|
||||
style: TextStyle(fontSize: 12),
|
||||
),]
|
||||
if (userId == "guest") ...[
|
||||
Text(userName ?? 'Guest User'),
|
||||
] else ...[
|
||||
Text(userName ?? 'Loading...'),
|
||||
Text(
|
||||
userEmail ?? 'Loading...',
|
||||
style: TextStyle(fontSize: 12),
|
||||
),
|
||||
]
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -698,20 +730,13 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
],
|
||||
),
|
||||
),
|
||||
if(userId != 'guest')
|
||||
ListTile(
|
||||
<<<<<<< HEAD
|
||||
leading: Icon(Icons.feedback),
|
||||
// title: const Text('Feedback'),
|
||||
title: Text(AppLocalizations.of(context)!.feedback_title),
|
||||
onTap: () => context.go('/feedback'),
|
||||
=======
|
||||
leading: Icon(Icons.manage_accounts),
|
||||
// title: Text('Manage User'),
|
||||
title: Text(AppLocalizations.of(context)!.manage_user,),
|
||||
onTap: () => context.go('/manageuser'),
|
||||
>>>>>>> aab1520305f7176b69eb4d5b8be01b832c8c0c71
|
||||
),
|
||||
if (userId != 'guest')
|
||||
ListTile(
|
||||
leading: Icon(Icons.feedback),
|
||||
// title: const Text('Feedback'),
|
||||
title: Text(AppLocalizations.of(context)!.feedback_title),
|
||||
onTap: () => context.go('/feedback'),
|
||||
),
|
||||
if (role == 'admin')
|
||||
ListTile(
|
||||
leading: Icon(Icons.manage_accounts),
|
||||
|
||||
@ -433,10 +433,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fl_chart
|
||||
sha256: "74959b99b92b9eebeed1a4049426fd67c4abc3c5a0f4d12e2877097d6a11ae08"
|
||||
sha256: "5276944c6ffc975ae796569a826c38a62d2abcf264e26b88fa6f482e107f4237"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.69.2"
|
||||
version: "0.70.2"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
|
||||
@ -22,7 +22,7 @@ dependencies:
|
||||
riverpod_annotation: ^2.3.3
|
||||
cupertino_icons: ^1.0.6
|
||||
|
||||
fl_chart: ^0.69.2
|
||||
fl_chart: ^0.70.2
|
||||
tutorial_coach_mark: ^1.2.12
|
||||
marquee: ^2.2.3
|
||||
url_launcher: ^6.3.1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user