refactor: migrate JWT storage to secure storage, update assets, and enhance login verification logic.
This commit is contained in:
@@ -115,7 +115,8 @@ class HomeCaptain extends StatelessWidget {
|
||||
const Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 24),
|
||||
child: Icon(Icons.pin_drop_rounded, size: 48, color: Colors.red),
|
||||
child: Icon(Icons.pin_drop_rounded,
|
||||
size: 48, color: Colors.red),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
@@ -124,7 +125,8 @@ class HomeCaptain extends StatelessWidget {
|
||||
right: 20,
|
||||
child: Card(
|
||||
color: _Token.surfaceCard(context),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16)),
|
||||
elevation: 10,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
@@ -133,7 +135,8 @@ class HomeCaptain extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
'Move map to select destination'.tr,
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
style:
|
||||
const TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
@@ -141,10 +144,13 @@ class HomeCaptain extends StatelessWidget {
|
||||
Expanded(
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
destCtrl.isSelectingDestinationOnMap = false;
|
||||
destCtrl.isSelectingDestinationOnMap =
|
||||
false;
|
||||
destCtrl.update();
|
||||
},
|
||||
child: Text('Cancel'.tr, style: const TextStyle(color: Colors.grey)),
|
||||
child: Text('Cancel'.tr,
|
||||
style: const TextStyle(
|
||||
color: Colors.grey)),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
@@ -152,19 +158,30 @@ class HomeCaptain extends StatelessWidget {
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColor.primaryColor,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(10)),
|
||||
),
|
||||
onPressed: () async {
|
||||
final pickerPos = homeCaptainController.currentCameraPosition?.target ??
|
||||
homeCaptainController.mapHomeCaptainController?.cameraPosition?.target;
|
||||
final pickerPos = homeCaptainController
|
||||
.currentCameraPosition?.target ??
|
||||
homeCaptainController
|
||||
.mapHomeCaptainController
|
||||
?.cameraPosition
|
||||
?.target;
|
||||
if (pickerPos != null) {
|
||||
destCtrl.isSelectingDestinationOnMap = false;
|
||||
destCtrl.isSelectingDestinationOnMap =
|
||||
false;
|
||||
destCtrl.update();
|
||||
final name = await destCtrl.reverseGeocode(pickerPos);
|
||||
destCtrl.saveDestination(pickerPos, name);
|
||||
final name = await destCtrl
|
||||
.reverseGeocode(pickerPos);
|
||||
destCtrl.saveDestination(
|
||||
pickerPos, name);
|
||||
}
|
||||
},
|
||||
child: Text('Confirm Location'.tr, style: const TextStyle(color: Colors.white)),
|
||||
child: Text('Confirm Location'.tr,
|
||||
style: const TextStyle(
|
||||
color: Colors.white)),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -206,17 +223,18 @@ class _HomeAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.only(left: 4),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_LogoBadge(),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
const SizedBox(width: 6),
|
||||
Flexible(
|
||||
child: Text(
|
||||
AppInformation.appName.split(' ')[0].tr,
|
||||
style: const TextStyle(
|
||||
color: _Token.accent,
|
||||
fontSize: 20,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w800,
|
||||
letterSpacing: 0.8,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -717,7 +735,7 @@ class _FloatingControls extends StatelessWidget {
|
||||
onTap: () =>
|
||||
Bubble().startBubbleHead(sendAppToBackground: true),
|
||||
tooltip: 'Overlay'.tr,
|
||||
child: Image.asset('assets/images/logo1.png',
|
||||
child: Image.asset('assets/images/logo.png',
|
||||
width: 26, height: 26),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
Reference in New Issue
Block a user