"git@183.82.99.133:saisrinivas/gen_erp_2025.git" did not exist on "185e08961d64f6f37bdf61113988bbb5866181e3"
Commit 3ad2ea55 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

ios Changes

parent 38d17dba
...@@ -227,7 +227,6 @@ class Paymentdetailsprovider extends ChangeNotifier { ...@@ -227,7 +227,6 @@ class Paymentdetailsprovider extends ChangeNotifier {
if (data.error == 0) { if (data.error == 0) {
print(data.paymentCollectionId); print(data.paymentCollectionId);
_CollectionId = data.paymentCollectionId ?? 0; _CollectionId = data.paymentCollectionId ?? 0;
notifyListeners(); notifyListeners();
} else {} } else {}
} else { } else {
...@@ -427,7 +426,7 @@ class Paymentdetailsprovider extends ChangeNotifier { ...@@ -427,7 +426,7 @@ class Paymentdetailsprovider extends ChangeNotifier {
email, email,
) async { ) async {
if (actName == "Generator") { if (actName == "Generator") {
_saveAgainst = "Generator"; _saveAgainst = "generator";
_genId = generatorID; _genId = generatorID;
} else { } else {
_saveAgainst = "account"; _saveAgainst = "account";
......
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'dart:async';
class Connectivityprovider extends ChangeNotifier {
static final Connectivityprovider _instance = Connectivityprovider._();
static Connectivityprovider get instance => _instance;
final Connectivity _connectivity = Connectivity();
bool _isOnline = false;
Map<ConnectivityResult, bool> _source = {ConnectivityResult.none: false};
Connectivityprovider._() {
initialise();
}
bool get isOnline => _isOnline;
Map<ConnectivityResult, bool> get source => _source;
void initialise() async {
List<ConnectivityResult> result = await _connectivity.checkConnectivity();
_checkStatus(result.first);
_connectivity.onConnectivityChanged.listen((result) {
_checkStatus(result.first);
});
}
void _checkStatus(ConnectivityResult result) async {
bool isOnline = false;
try {
final lookupResult = await InternetAddress.lookup('example.com');
isOnline =
lookupResult.isNotEmpty && lookupResult[0].rawAddress.isNotEmpty;
} on SocketException catch (_) {
isOnline = false;
}
_source = {result: isOnline};
_isOnline = isOnline;
notifyListeners(); // Notify all listeners of the change
}
void dispose() {
// No StreamController to close, as we're using ChangeNotifier
}
}
...@@ -483,12 +483,11 @@ class Requestionlistprovider extends ChangeNotifier { ...@@ -483,12 +483,11 @@ class Requestionlistprovider extends ChangeNotifier {
approvalEmployeeID, approvalEmployeeID,
) async { ) async {
try { try {
_submitClicked = true;
notifyListeners();
if (!validateForm(context, mode)) { if (!validateForm(context, mode)) {
_submitClicked = false;
return; return;
} }
_submitClicked = true;
notifyListeners();
var homeProvider = Provider.of<HomescreenNotifier>( var homeProvider = Provider.of<HomescreenNotifier>(
context, context,
...@@ -511,8 +510,8 @@ class Requestionlistprovider extends ChangeNotifier { ...@@ -511,8 +510,8 @@ class Requestionlistprovider extends ChangeNotifier {
bankIfscController.text, bankIfscController.text,
bankAcHolderController.text, bankAcHolderController.text,
bankUpiController.text, bankUpiController.text,
_image,
approvalEmployeeID, approvalEmployeeID,
_image,
); );
if (data != null) { if (data != null) {
if (data.error == "0") { if (data.error == "0") {
...@@ -550,11 +549,20 @@ class Requestionlistprovider extends ChangeNotifier { ...@@ -550,11 +549,20 @@ class Requestionlistprovider extends ChangeNotifier {
if (data != null) { if (data != null) {
if (data.error == "0") { if (data.error == "0") {
_directPaymentAccounts = data.paymentAccounts!; _directPaymentAccounts = data.paymentAccounts!;
_directPaymentAccounts = [DirectPaymentAccounts(id: "",name: "Select"),...data.paymentAccounts!]; _directPaymentAccounts = [
DirectPaymentAccounts(id: "", name: "Select"),
...data.paymentAccounts!,
];
_directPaymentModes = data.paymentModes!; _directPaymentModes = data.paymentModes!;
_directPaymentModes = [DirectPaymentModes(name: "Select",id: ""),...data.paymentModes!]; _directPaymentModes = [
DirectPaymentModes(name: "Select", id: ""),
...data.paymentModes!,
];
_directAccounts = data.accounts!; _directAccounts = data.accounts!;
_directAccounts = [DirectAccounts(id: "",name: "Select"),...data.accounts!]; _directAccounts = [
DirectAccounts(id: "", name: "Select"),
...data.accounts!,
];
checkdirectPaymentDropDownsSlected(); checkdirectPaymentDropDownsSlected();
notifyListeners(); notifyListeners();
...@@ -1058,6 +1066,14 @@ class Requestionlistprovider extends ChangeNotifier { ...@@ -1058,6 +1066,14 @@ class Requestionlistprovider extends ChangeNotifier {
!_requestingPurposes.contains(_selectReqPurpose)) { !_requestingPurposes.contains(_selectReqPurpose)) {
_selectReqPurpose = null; _selectReqPurpose = null;
} }
if (_selectedApprovalEmployee != null &&
!_approvalEmployee.contains(_selectedApprovalEmployee)) {
_selectedApprovalEmployee = null;
_selectedApprovalEmployeeID = null;
_selectedApprovalEmployeeValue = null;
}
notifyListeners();
} }
bool validateForm(BuildContext context, String mode) { bool validateForm(BuildContext context, String mode) {
...@@ -1156,6 +1172,7 @@ class Requestionlistprovider extends ChangeNotifier { ...@@ -1156,6 +1172,7 @@ class Requestionlistprovider extends ChangeNotifier {
// isValid = false;_submitClicked = false; // isValid = false;_submitClicked = false;
// } // }
buttonEnabled = isValid; buttonEnabled = isValid;
_submitClicked = true;
notifyListeners(); notifyListeners();
return isValid; return isValid;
} }
......
...@@ -42,7 +42,7 @@ class SplashVersionNotifier extends ChangeNotifier { ...@@ -42,7 +42,7 @@ class SplashVersionNotifier extends ChangeNotifier {
if (_packagedetails.isEmpty) { if (_packagedetails.isEmpty) {
await initPackageInfo(); await initPackageInfo();
} }
var loginProvider = Provider.of<Loginnotifier>(context,listen: false); var loginProvider = Provider.of<Loginnotifier>(context, listen: false);
var loginStatus = await SharedpreferencesService().getInt("loginStatus"); var loginStatus = await SharedpreferencesService().getInt("loginStatus");
print("login status: ${loginStatus}"); print("login status: ${loginStatus}");
...@@ -59,7 +59,6 @@ class SplashVersionNotifier extends ChangeNotifier { ...@@ -59,7 +59,6 @@ class SplashVersionNotifier extends ChangeNotifier {
} }
if (Platform.isAndroid && if (Platform.isAndroid &&
currentBuild < (data.latestVersionCode ?? 0)) { currentBuild < (data.latestVersionCode ?? 0)) {
print("Update"); print("Update");
AppUpdateDialouge(context, data.url!, data.releaseNotes!); AppUpdateDialouge(context, data.url!, data.releaseNotes!);
} else if (Platform.isIOS && } else if (Platform.isIOS &&
......
String didPushed = ""; String didPushed = "";
String didPopped = ""; String didPopped = "";
\ No newline at end of file var connection;
import 'dart:async';
import 'dart:io';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart'; import 'package:fluttertoast/fluttertoast.dart';
toast(context,text) { toast(context, text) {
// OwnToast(context, text, "0"); // OwnToast(context, text, "0");
Fluttertoast.showToast( Fluttertoast.showToast(
msg: text, msg: text,
...@@ -13,4 +16,36 @@ toast(context,text) { ...@@ -13,4 +16,36 @@ toast(context,text) {
textColor: Colors.white, textColor: Colors.white,
fontSize: 15.0, fontSize: 15.0,
); );
} }
\ No newline at end of file
class MyConnectivity {
MyConnectivity._();
static final _instance = MyConnectivity._();
static MyConnectivity get instance => _instance;
final _connectivity = Connectivity();
final _controller = StreamController.broadcast();
Stream get myStream => _controller.stream;
void initialise() async {
ConnectivityResult result =
(await _connectivity.checkConnectivity()) as ConnectivityResult;
_checkStatus(result);
_connectivity.onConnectivityChanged.listen((result) {
_checkStatus(result as ConnectivityResult);
});
}
void _checkStatus(ConnectivityResult result) async {
bool isOnline = false;
try {
final result = await InternetAddress.lookup('example.com');
isOnline = result.isNotEmpty && result[0].rawAddress.isNotEmpty;
} on SocketException catch (_) {
isOnline = false;
}
_controller.sink.add({result: isOnline});
}
void disposeStream() => _controller.close();
}
...@@ -141,7 +141,7 @@ Widget textControllerWidget( ...@@ -141,7 +141,7 @@ Widget textControllerWidget(
height: hintText == "Enter Description" ? 150 : 50, height: hintText == "Enter Description" ? 150 : 50,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color:readonly?Color(0xFFD7D7D7): AppColors.text_field_color, color: readonly ? Color(0xFFD7D7D7) : AppColors.text_field_color,
borderRadius: BorderRadius.circular(14), borderRadius: BorderRadius.circular(14),
), ),
child: Padding( child: Padding(
...@@ -175,7 +175,7 @@ Widget textControllerWidget( ...@@ -175,7 +175,7 @@ Widget textControllerWidget(
? [FilteringTextInputFormatter.digitsOnly] ? [FilteringTextInputFormatter.digitsOnly]
: [], : [],
style: TextStyle( style: TextStyle(
color: readonly?Color(0xFF9e9e9e):AppColors.semi_black color: readonly ? Color(0xFF9e9e9e) : AppColors.semi_black,
), ),
decoration: InputDecoration( decoration: InputDecoration(
counterText: "", counterText: "",
...@@ -198,12 +198,13 @@ Widget textControllerWidget( ...@@ -198,12 +198,13 @@ Widget textControllerWidget(
NoNetwork(context) { NoNetwork(context) {
return Container( return Container(
decoration: BoxDecoration(color: AppColors.scaffold_bg_color),
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Image.asset('assets/images/no_wifi.png', width: 100, height: 100), // Image.asset('assets/images/no_wifi.png', width: 100, height: 100),
SizedBox(height: 10), SizedBox(height: 10),
Center( Center(
child: Text( child: Text(
......
...@@ -247,8 +247,7 @@ class MyApp extends StatelessWidget { ...@@ -247,8 +247,7 @@ class MyApp extends StatelessWidget {
tabBarTheme: const TabBarThemeData(), tabBarTheme: const TabBarThemeData(),
textSelectionTheme: TextSelectionThemeData( textSelectionTheme: TextSelectionThemeData(
cursorColor: AppColors.app_blue,
cursorColor: AppColors.app_blue
), ),
dialogTheme: const DialogThemeData( dialogTheme: const DialogThemeData(
shadowColor: Colors.white, shadowColor: Colors.white,
...@@ -296,7 +295,7 @@ class MyApp extends StatelessWidget { ...@@ -296,7 +295,7 @@ class MyApp extends StatelessWidget {
AppColors.grey_semi.withOpacity(0.6), AppColors.grey_semi.withOpacity(0.6),
), ),
), ),
useMaterial3: true useMaterial3: true,
// inputDecorationTheme: InputDecorationTheme( // inputDecorationTheme: InputDecorationTheme(
// hintStyle: TextStyle( // hintStyle: TextStyle(
// fontWeight: FontWeight.w400, // fontWeight: FontWeight.w400,
......
This diff is collapsed.
...@@ -77,205 +77,201 @@ class _WebERPIOSState extends State<WebERPIOS> { ...@@ -77,205 +77,201 @@ class _WebERPIOSState extends State<WebERPIOS> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return WillPopScope( return Platform.isAndroid
onWillPop: () async { ? WillPopScope(
if (await webViewController!.canGoBack()) { onWillPop: () => onBackPressed(context),
webViewController!.goBack(); child: SafeArea(top: false, bottom: true, child: _scaffold(context)),
return false; // Prevent default back button behavior )
} : _scaffold(context);
return true; // Allow default back button behavior }
},
child: SafeArea(
top: false,
bottom: Platform.isIOS?false:true,
child: Scaffold(
appBar: appbar(context, "ERP"),
body: Container(
child: Column(
children: <Widget>[
Expanded(
child: Stack(
children: [
InAppWebView(
initialUrlRequest: URLRequest(
url: WebUri(widget.url.toString()),
),
androidOnGeolocationPermissionsShowPrompt: (
InAppWebViewController controller,
String origin,
) async {
return GeolocationPermissionShowPromptResponse(
origin: origin,
allow: true,
retain: true,
);
},
initialOptions: InAppWebViewGroupOptions(
android: AndroidInAppWebViewOptions(
useWideViewPort: true,
loadWithOverviewMode: true,
allowContentAccess: true,
geolocationEnabled: true,
allowFileAccess: true,
databaseEnabled: true, // Enables the WebView database
domStorageEnabled: true, // Enables DOM storage
builtInZoomControls:
true, // Enables the built-in zoom controls
displayZoomControls:
false, // Disables displaying zoom controls
safeBrowsingEnabled: true, // Enables Safe Browsing
),
ios: IOSInAppWebViewOptions(
allowsInlineMediaPlayback: true,
allowsLinkPreview: true,
allowsBackForwardNavigationGestures: true,
),
),
androidOnPermissionRequest: (
InAppWebViewController controller,
String origin,
List<String> resources,
) async {
return PermissionRequestResponse(
resources: resources,
action: PermissionRequestResponseAction.GRANT,
);
},
initialSettings: InAppWebViewSettings(
javaScriptEnabled: true,
allowFileAccess: true,
allowContentAccess: true,
clearCache: true,
blockNetworkLoads: false,
networkAvailable: true,
useOnLoadResource: true,
thirdPartyCookiesEnabled: true,
supportZoom: false,
geolocationEnabled: true,
safeBrowsingEnabled: false,
saveFormData: true,
allowFileAccessFromFileURLs: true,
useWideViewPort: true,
databaseEnabled: true,
domStorageEnabled: true,
allowsBackForwardNavigationGestures: true,
allowUniversalAccessFromFileURLs: true,
allowsLinkPreview: true,
),
onPermissionRequest: (controller, request) async {
return PermissionResponse(
resources: request.resources,
action: PermissionResponseAction.GRANT,
);
},
keepAlive: InAppWebViewKeepAlive(),
// initialData:
// InAppWebViewInitialData(baseUrl: WebUri(widget.url),data: ),
onWebViewCreated: (controller) {
webViewController = controller;
_controller.complete(controller);
},
pullToRefreshController: pullToRefreshController,
shouldOverrideUrlLoading: (
controller,
navigationAction,
) async {
var uri = navigationAction.request.url!;
print("urib scgefes");
print(uri);
print(uri.scheme);
if (uri.scheme == "tel") {
// Launch the phone dialer app with the specified phone number
if (await canLaunch(uri.toString())) {
await launch(uri.toString());
return NavigationActionPolicy.CANCEL;
}
} else if (uri.scheme == "mailto") {
if (await canLaunch(uri.toString())) {
await launch(uri.toString());
return NavigationActionPolicy.CANCEL;
}
} else if (uri.scheme == "whatsapp") {
// Launch WhatsApp with the specified chat or phone number
if (await canLaunch(uri.toString())) {
await launch(uri.toString());
return NavigationActionPolicy.CANCEL;
}
}
// // Check if the URL is trying to access the camera for image upload
// if (uri.scheme == 'camera' && uri.path.contains('/camera/')) {
// // Handle camera image upload here
// // You might want to display a custom UI for image selection or directly trigger the camera
// // You can use platform-specific plugins like image_picker for this purpose
// // Once the image is selected, you can pass it to the web view using JavaScript injection
// if (await canLaunch(uri.toString())) {
// await launch(uri.toString());
// return NavigationActionPolicy.CANCEL;
// }
// }
return NavigationActionPolicy.ALLOW;
},
onLoadStart: (controller, url) { Widget _scaffold(BuildContext context) {
return setState(() { return Scaffold(
isLoading = true; appBar: appbar(context, "ERP"),
}); body: Container(
}, child: Column(
onLoadStop: (controller, url) { children: <Widget>[
pullToRefreshController?.endRefreshing(); Expanded(
return setState(() { child: Stack(
isLoading = false; children: [
}); InAppWebView(
}, initialUrlRequest: URLRequest(
onReceivedError: (controller, request, error) { url: WebUri(widget.url.toString()),
pullToRefreshController?.endRefreshing(); ),
}, androidOnGeolocationPermissionsShowPrompt: (
onProgressChanged: (controller, progress) { InAppWebViewController controller,
if (progress == 100) { String origin,
pullToRefreshController?.endRefreshing(); ) async {
} return GeolocationPermissionShowPromptResponse(
}, origin: origin,
allow: true,
retain: true,
);
},
initialOptions: InAppWebViewGroupOptions(
android: AndroidInAppWebViewOptions(
useWideViewPort: true,
loadWithOverviewMode: true,
allowContentAccess: true,
geolocationEnabled: true,
allowFileAccess: true,
databaseEnabled: true, // Enables the WebView database
domStorageEnabled: true, // Enables DOM storage
builtInZoomControls:
true, // Enables the built-in zoom controls
displayZoomControls:
false, // Disables displaying zoom controls
safeBrowsingEnabled: true, // Enables Safe Browsing
), ),
if (isLoading) ...[ ios: IOSInAppWebViewOptions(
Container( allowsInlineMediaPlayback: true,
color: Colors.white.withOpacity(0.7), allowsLinkPreview: true,
child: Column( allowsBackForwardNavigationGestures: true,
crossAxisAlignment: CrossAxisAlignment.center, ),
mainAxisAlignment: MainAxisAlignment.center, ),
children: [
SpinKitRing( androidOnPermissionRequest: (
InAppWebViewController controller,
String origin,
List<String> resources,
) async {
return PermissionRequestResponse(
resources: resources,
action: PermissionRequestResponseAction.GRANT,
);
},
initialSettings: InAppWebViewSettings(
javaScriptEnabled: true,
allowFileAccess: true,
allowContentAccess: true,
clearCache: true,
blockNetworkLoads: false,
networkAvailable: true,
useOnLoadResource: true,
thirdPartyCookiesEnabled: true,
supportZoom: false,
geolocationEnabled: true,
safeBrowsingEnabled: false,
saveFormData: true,
allowFileAccessFromFileURLs: true,
useWideViewPort: true,
databaseEnabled: true,
domStorageEnabled: true,
allowsBackForwardNavigationGestures: true,
allowUniversalAccessFromFileURLs: true,
allowsLinkPreview: true,
),
onPermissionRequest: (controller, request) async {
return PermissionResponse(
resources: request.resources,
action: PermissionResponseAction.GRANT,
);
},
keepAlive: InAppWebViewKeepAlive(),
// initialData:
// InAppWebViewInitialData(baseUrl: WebUri(widget.url),data: ),
onWebViewCreated: (controller) {
webViewController = controller;
_controller.complete(controller);
},
pullToRefreshController: pullToRefreshController,
shouldOverrideUrlLoading: (
controller,
navigationAction,
) async {
var uri = navigationAction.request.url!;
print("urib scgefes");
print(uri);
print(uri.scheme);
if (uri.scheme == "tel") {
// Launch the phone dialer app with the specified phone number
if (await canLaunch(uri.toString())) {
await launch(uri.toString());
return NavigationActionPolicy.CANCEL;
}
} else if (uri.scheme == "mailto") {
if (await canLaunch(uri.toString())) {
await launch(uri.toString());
return NavigationActionPolicy.CANCEL;
}
} else if (uri.scheme == "whatsapp") {
// Launch WhatsApp with the specified chat or phone number
if (await canLaunch(uri.toString())) {
await launch(uri.toString());
return NavigationActionPolicy.CANCEL;
}
}
// // Check if the URL is trying to access the camera for image upload
// if (uri.scheme == 'camera' && uri.path.contains('/camera/')) {
// // Handle camera image upload here
// // You might want to display a custom UI for image selection or directly trigger the camera
// // You can use platform-specific plugins like image_picker for this purpose
// // Once the image is selected, you can pass it to the web view using JavaScript injection
// if (await canLaunch(uri.toString())) {
// await launch(uri.toString());
// return NavigationActionPolicy.CANCEL;
// }
// }
return NavigationActionPolicy.ALLOW;
},
onLoadStart: (controller, url) {
return setState(() {
isLoading = true;
});
},
onLoadStop: (controller, url) {
pullToRefreshController?.endRefreshing();
return setState(() {
isLoading = false;
});
},
onReceivedError: (controller, request, error) {
pullToRefreshController?.endRefreshing();
},
onProgressChanged: (controller, progress) {
if (progress == 100) {
pullToRefreshController?.endRefreshing();
}
},
),
if (isLoading) ...[
Container(
color: Colors.white.withOpacity(0.7),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SpinKitRing(
color: AppColors.app_blue,
lineWidth: 4,
// duration: Duration(seconds: 2),
size: 50,
),
const SizedBox(height: 15),
SizedBox(
width: 200,
child: Text(
"Please wait.......",
textAlign: TextAlign.center,
style: TextStyle(
decorationThickness: 0,
fontSize: 15,
fontWeight: FontWeight.normal,
color: AppColors.app_blue, color: AppColors.app_blue,
lineWidth: 4,
// duration: Duration(seconds: 2),
size: 50,
), ),
const SizedBox(height: 15), ),
SizedBox(
width: 200,
child: Text(
"Please wait.......",
textAlign: TextAlign.center,
style: TextStyle(
decorationThickness: 0,
fontSize: 15,
fontWeight: FontWeight.normal,
color: AppColors.app_blue,
),
),
),
// SvgPicture.asset("/assets/images/NutsLoader.gif")
],
), ),
),
], // SvgPicture.asset("/assets/images/NutsLoader.gif")
], ],
), ),
), ),
], ],
],
),
), ),
), ],
), ),
), ),
); );
......
...@@ -16,13 +16,14 @@ import 'WebERPScreen.dart'; ...@@ -16,13 +16,14 @@ import 'WebERPScreen.dart';
Future runErpScreenApp2() async { Future runErpScreenApp2() async {
await FlutterDownloader.initialize( await FlutterDownloader.initialize(
debug: true // optional: set false to disable printing logs to console debug: true, // optional: set false to disable printing logs to console
); );
await Permission.storage.request(); await Permission.storage.request();
} }
class WebWhizzdomScreen extends StatefulWidget { class WebWhizzdomScreen extends StatefulWidget {
final String whizzdom_url; final String whizzdom_url;
const WebWhizzdomScreen({super.key,required this.whizzdom_url}); const WebWhizzdomScreen({super.key, required this.whizzdom_url});
@override @override
State<WebWhizzdomScreen> createState() => _WebWhizzdomScreenState(); State<WebWhizzdomScreen> createState() => _WebWhizzdomScreenState();
...@@ -30,7 +31,7 @@ class WebWhizzdomScreen extends StatefulWidget { ...@@ -30,7 +31,7 @@ class WebWhizzdomScreen extends StatefulWidget {
class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> { class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
final Completer<InAppWebViewController> _controller = final Completer<InAppWebViewController> _controller =
Completer<InAppWebViewController>(); Completer<InAppWebViewController>();
var empId = ""; var empId = "";
var sessionId = ""; var sessionId = "";
bool isLoading = true; bool isLoading = true;
...@@ -46,20 +47,23 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> { ...@@ -46,20 +47,23 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
@override @override
void initState() { void initState() {
// loadData(); // loadData();
pullToRefreshController = kIsWeb pullToRefreshController =
? null kIsWeb
: PullToRefreshController( ? null
settings: pullToRefreshSettings, : PullToRefreshController(
onRefresh: () async { settings: pullToRefreshSettings,
if (defaultTargetPlatform == TargetPlatform.android) { onRefresh: () async {
webViewController?.reload(); if (defaultTargetPlatform == TargetPlatform.android) {
} else if (defaultTargetPlatform == TargetPlatform.iOS) { webViewController?.reload();
webViewController?.loadUrl( } else if (defaultTargetPlatform == TargetPlatform.iOS) {
urlRequest: webViewController?.loadUrl(
URLRequest(url: await webViewController?.getUrl())); urlRequest: URLRequest(
} url: await webViewController?.getUrl(),
}, ),
); );
}
},
);
// print("URL:${widget.url}"); // print("URL:${widget.url}");
super.initState(); super.initState();
} }
...@@ -68,125 +72,134 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> { ...@@ -68,125 +72,134 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
void dispose() { void dispose() {
super.dispose(); super.dispose();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return WillPopScope( return Platform.isAndroid
onWillPop: () async { ? WillPopScope(
if (await webViewController!.canGoBack()) { onWillPop: () => onBackPressed(context),
webViewController!.goBack(); child: SafeArea(top: false, bottom: true, child: _scaffold(context)),
return false; // Prevent default back button behavior )
} : _scaffold(context);
return true; // Allow default back button behavior }
},
child: SafeArea(
top: false,
bottom: Platform.isIOS?false:true,
child: Scaffold(
resizeToAvoidBottomInset: true,
appBar: appbar(context, "Whizzdom"),
body: Container(
child: Column(children: <Widget>[
Expanded(
child: Stack(
children: [
InAppWebView(
initialUrlRequest: URLRequest(
url: WebUri(widget.whizzdom_url),
),
androidOnGeolocationPermissionsShowPrompt:
(InAppWebViewController controller, String origin) async {
return GeolocationPermissionShowPromptResponse(
origin: origin, allow: true, retain: true);
},
initialOptions: InAppWebViewGroupOptions(
android: AndroidInAppWebViewOptions(
useWideViewPort: true,
loadWithOverviewMode: true,
allowContentAccess: true,
geolocationEnabled: true,
allowFileAccess: true,
databaseEnabled: true, // Enables the WebView database
domStorageEnabled: true, // Enables DOM storage
builtInZoomControls:
true, // Enables the built-in zoom controls
displayZoomControls:
false, // Disables displaying zoom controls
safeBrowsingEnabled: true, // Enables Safe Browsing
clearSessionCache: true,
),
ios: IOSInAppWebViewOptions(
allowsInlineMediaPlayback: true,
),
),
androidOnPermissionRequest: (InAppWebViewController controller, Widget _scaffold(BuildContext context) {
String origin, List<String> resources) async { return Scaffold(
return PermissionRequestResponse( resizeToAvoidBottomInset: true,
resources: resources, appBar: appbar(context, "Whizzdom"),
action: PermissionRequestResponseAction.GRANT); body: Container(
}, child: Column(
onWebViewCreated: (controller) { children: <Widget>[
webViewController = controller; Expanded(
_controller.complete(controller); child: Stack(
}, children: [
pullToRefreshController: pullToRefreshController, InAppWebView(
onLoadStart: (controller, url) { initialUrlRequest: URLRequest(
return setState(() { url: WebUri(widget.whizzdom_url),
isLoading = true; ),
}); androidOnGeolocationPermissionsShowPrompt: (
}, InAppWebViewController controller,
onLoadStop: (controller, url) { String origin,
pullToRefreshController?.endRefreshing(); ) async {
return setState(() { return GeolocationPermissionShowPromptResponse(
isLoading = false; origin: origin,
}); allow: true,
}, retain: true,
onReceivedError: (controller, request, error) { );
pullToRefreshController?.endRefreshing(); },
}, initialOptions: InAppWebViewGroupOptions(
onProgressChanged: (controller, progress) { android: AndroidInAppWebViewOptions(
if (progress == 100) { useWideViewPort: true,
pullToRefreshController?.endRefreshing(); loadWithOverviewMode: true,
} allowContentAccess: true,
}, geolocationEnabled: true,
allowFileAccess: true,
databaseEnabled: true, // Enables the WebView database
domStorageEnabled: true, // Enables DOM storage
builtInZoomControls:
true, // Enables the built-in zoom controls
displayZoomControls:
false, // Disables displaying zoom controls
safeBrowsingEnabled: true, // Enables Safe Browsing
clearSessionCache: true,
),
ios: IOSInAppWebViewOptions(
allowsInlineMediaPlayback: true,
),
),
), androidOnPermissionRequest: (
if (isLoading) ...[Container( InAppWebViewController controller,
color: Colors.white.withOpacity(0.7), String origin,
child: Column( List<String> resources,
crossAxisAlignment: CrossAxisAlignment.center, ) async {
mainAxisAlignment: MainAxisAlignment.center, return PermissionRequestResponse(
children: [ resources: resources,
SpinKitRing( action: PermissionRequestResponseAction.GRANT,
);
},
onWebViewCreated: (controller) {
webViewController = controller;
_controller.complete(controller);
},
pullToRefreshController: pullToRefreshController,
onLoadStart: (controller, url) {
return setState(() {
isLoading = true;
});
},
onLoadStop: (controller, url) {
pullToRefreshController?.endRefreshing();
return setState(() {
isLoading = false;
});
},
onReceivedError: (controller, request, error) {
pullToRefreshController?.endRefreshing();
},
onProgressChanged: (controller, progress) {
if (progress == 100) {
pullToRefreshController?.endRefreshing();
}
},
),
if (isLoading) ...[
Container(
color: Colors.white.withOpacity(0.7),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SpinKitRing(
color: AppColors.app_blue,
lineWidth: 4,
// duration: Duration(seconds: 2),
size: 50,
),
const SizedBox(height: 15),
SizedBox(
width: 200,
child: Text(
"Please wait.......",
textAlign: TextAlign.center,
style: TextStyle(
decorationThickness: 0,
fontSize: 15,
fontWeight: FontWeight.normal,
color: AppColors.app_blue, color: AppColors.app_blue,
lineWidth: 4,
// duration: Duration(seconds: 2),
size: 50,
),
const SizedBox(
height: 15,
),
SizedBox(
width: 200,
child: Text(
"Please wait.......",
textAlign: TextAlign.center,
style: TextStyle(
decorationThickness: 0,
fontSize: 15,
fontWeight: FontWeight.normal,
color: AppColors.app_blue),
),
), ),
),
// SvgPicture.asset("/assets/images/NutsLoader.gif")
],
), ),
)]
], // SvgPicture.asset("/assets/images/NutsLoader.gif")
)) ],
])), ),
),
],
],
),
),
],
), ),
), ),
); );
......
This diff is collapsed.
...@@ -29,175 +29,167 @@ class _FinancedashboardState extends State<Financedashboard> { ...@@ -29,175 +29,167 @@ class _FinancedashboardState extends State<Financedashboard> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Platform.isAndroid
? WillPopScope(
onWillPop: () => onBackPressed(context),
child: SafeArea(top: false, bottom: true, child: _scaffold(context)),
)
: _scaffold(context);
}
Widget _scaffold(BuildContext context) {
return Consumer<Dashboardprovider>( return Consumer<Dashboardprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
final pages = provider.accessiblePagesList; final pages = provider.accessiblePagesList;
return WillPopScope( return Scaffold(
onWillPop: () => onBackPressed(context), resizeToAvoidBottomInset: true,
child: SafeArea( backgroundColor: AppColors.scaffold_bg_color,
top: false, appBar: appbar(context, "Finance"),
bottom: Platform.isIOS?false:true, body: SizedBox(
child: Scaffold( child: SingleChildScrollView(
resizeToAvoidBottomInset: true, child: Column(
backgroundColor: AppColors.scaffold_bg_color, children: [
appBar: appbar(context, "Finance"), ListView.builder(
body: SizedBox( itemCount: pages.length,
child: SingleChildScrollView( shrinkWrap: true,
child: Column( physics: NeverScrollableScrollPhysics(),
children: [ itemBuilder: (context, index) {
ListView.builder( Widget? SvgIcon;
itemCount: pages.length, switch (pages[index].mode) {
shrinkWrap: true, case "apr_lvl1":
physics: NeverScrollableScrollPhysics(), SvgIcon = SvgPicture.asset("assets/svg/fin_lv1.svg");
itemBuilder: (context, index) { break;
Widget? SvgIcon; case "apr_lvl2":
switch (pages[index].mode) { SvgIcon = SvgPicture.asset("assets/svg/fin_lv2.svg");
case "apr_lvl1": break;
SvgIcon = SvgPicture.asset( final icons = ["comm_ic_1", "comm_ic_2"];
"assets/svg/fin_lv1.svg", default:
); SvgIcon = SvgPicture.asset("assets/svg/fin_ic.svg");
break; break;
case "apr_lvl2": }
SvgIcon = SvgPicture.asset( return InkResponse(
"assets/svg/fin_lv2.svg", onTap: () async {
); var navigate;
break; if (pages[index].pageName == "Payments List") {
final icons = ["comm_ic_1", "comm_ic_2"]; navigate = Paymentlistpaymentrequisition(
default: pageTitleName:
SvgIcon = SvgPicture.asset( provider.accessiblePagesList[index].pageName!,
"assets/svg/fin_ic.svg", );
); } else if (provider
break; .accessiblePagesList[index]
} .pageName ==
return InkResponse( "Payment Receipts List") {
onTap: () async { navigate = Paymentreceiptlist(
var navigate; pageTitleName:
if (pages[index].pageName == "Payments List") { provider.accessiblePagesList[index].pageName!,
navigate = Paymentlistpaymentrequisition( );
pageTitleName: } else if (provider
provider .accessiblePagesList[index]
.accessiblePagesList[index] .pageName ==
.pageName!, "Account List") {
); navigate = Accountslist();
} else if (provider
.accessiblePagesList[index]
.pageName ==
"Payment Receipts List") {
navigate = Paymentreceiptlist(
pageTitleName:
provider
.accessiblePagesList[index]
.pageName!,
);
} else if (provider
.accessiblePagesList[index]
.pageName ==
"Account List") {
navigate = Accountslist();
// break; // break;
} else if (provider } else if (provider
.accessiblePagesList[index]
.pageName ==
"Account Ledger") {
navigate = Accountledger();
} else {
navigate = Allpaymentrequesitionlistsbymodes(
mode: pages[index].mode!,
pageTitleName:
provider.accessiblePagesList[index].pageName!,
);
}
await Navigator.push(
context,
MaterialPageRoute(builder: (context) => navigate),
);
},
child: Container(
margin: EdgeInsets.symmetric(
horizontal: 5,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(14),
),
child: Row(
children: [
if (provider
.accessiblePagesList[index] .accessiblePagesList[index]
.pageName == .pageName ==
"Account Ledger") { "Account List") ...[
navigate = Accountledger(); Expanded(
} else { flex: 1,
navigate = Allpaymentrequesitionlistsbymodes( child: SvgPicture.asset(
mode: pages[index].mode!, "assets/svg/comm_ic_1.svg",
pageTitleName: width: 25,
provider ),
.accessiblePagesList[index]
.pageName!,
);
}
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => navigate,
), ),
); ] else if (provider
},
child: Container(
margin: EdgeInsets.symmetric(
horizontal: 5,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(14),
),
child: Row(
children: [
if(provider
.accessiblePagesList[index] .accessiblePagesList[index]
.pageName == .pageName ==
"Account List")...[ "Account Ledger") ...[
Expanded(flex: 1, Expanded(
child: SvgPicture.asset( flex: 1,
"assets/svg/comm_ic_1.svg",width: 25, child: SvgPicture.asset(
), "assets/svg/comm_ic_2.svg",
) width: 25,
]else if(provider
.accessiblePagesList[index]
.pageName ==
"Account Ledger")...[
Expanded(flex: 1,
child: SvgPicture.asset(
"assets/svg/comm_ic_2.svg",width: 25,
),
)
]else...[
Expanded(flex: 1, child: SvgIcon),
],
Expanded(
flex: 5,
child: Text("${pages[index].pageName}"),
),
Expanded(
flex: 1,
child: SvgPicture.asset(
"assets/svg/arrow_right_new.svg",
),
), ),
], ),
] else ...[
Expanded(flex: 1, child: SvgIcon),
],
Expanded(
flex: 5,
child: Text("${pages[index].pageName}"),
), ),
), Expanded(
); flex: 1,
}, child: SvgPicture.asset(
), "assets/svg/arrow_right_new.svg",
SizedBox(height: 150,) ),
], ),
],
),
),
);
},
), ),
), SizedBox(height: 150),
],
), ),
floatingActionButtonLocation: ),
FloatingActionButtonLocation.centerFloat, ),
floatingActionButton: InkResponse( floatingActionButtonLocation:
onTap: () { FloatingActionButtonLocation.centerFloat,
_showPaymentOptionsSheet(context); floatingActionButton: InkResponse(
}, onTap: () {
child: Container( _showPaymentOptionsSheet(context);
height: 45, },
alignment: Alignment.center, child: Container(
margin: EdgeInsets.symmetric(horizontal: 10), height: 45,
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5), alignment: Alignment.center,
decoration: BoxDecoration( margin: EdgeInsets.symmetric(horizontal: 10),
color: AppColors.app_blue, padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
borderRadius: BorderRadius.circular(15), decoration: BoxDecoration(
), color: AppColors.app_blue,
child: Text( borderRadius: BorderRadius.circular(15),
"Add", ),
style: TextStyle( child: Text(
fontSize: 15, "Add",
fontFamily: "JakartaMedium", style: TextStyle(
color: Colors.white, fontSize: 15,
), fontFamily: "JakartaMedium",
), color: Colors.white,
), ),
), ),
), ),
...@@ -295,14 +287,16 @@ class _FinancedashboardState extends State<Financedashboard> { ...@@ -295,14 +287,16 @@ class _FinancedashboardState extends State<Financedashboard> {
), ),
); );
} else if (provider } else if (provider
.accessiblePagesList2[index] .accessiblePagesList2[index]
.pageName!.contains("Add Account")) { .pageName!
.contains("Add Account")) {
res = await Navigator.push( res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => Addcommonpayment( builder:
from: "Dashboard", (context) => Addcommonpayment(
), from: "Dashboard",
),
), ),
); );
} else { } else {
......
...@@ -17,6 +17,15 @@ class Gentrackerdashboard extends StatefulWidget { ...@@ -17,6 +17,15 @@ class Gentrackerdashboard extends StatefulWidget {
class _GentrackerdashboardState extends State<Gentrackerdashboard> { class _GentrackerdashboardState extends State<Gentrackerdashboard> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Platform.isAndroid
? WillPopScope(
onWillPop: () => onBackPressed(context),
child: SafeArea(top: false, bottom: true, child: _scaffold(context)),
)
: _scaffold(context);
}
Widget _scaffold(BuildContext context) {
final names = [ final names = [
"Generator Details", "Generator Details",
// "Register Complaint", // "Register Complaint",
...@@ -29,117 +38,109 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> { ...@@ -29,117 +38,109 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
// "gent_tag_loc", // "gent_tag_loc",
"gent_tag_den", "gent_tag_den",
]; ];
return WillPopScope( return Scaffold(
onWillPop: () => onBackPressed(context), resizeToAvoidBottomInset: true,
child: SafeArea( backgroundColor: AppColors.scaffold_bg_color,
top: false, appBar: appbar(context, "Gen Tracker"),
bottom: Platform.isIOS?false:true, body: Column(
child: Scaffold( children: [
resizeToAvoidBottomInset: true, Expanded(
backgroundColor: AppColors.scaffold_bg_color, flex: 1,
appBar: appbar(context, "Gen Tracker"), child: GridView.builder(
body: Column( padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
children: [ itemCount: names.length,
Expanded( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
flex: 1, crossAxisCount: 2,
child: GridView.builder( crossAxisSpacing: 10,
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10), mainAxisSpacing: 10,
itemCount: names.length, ),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( physics: NeverScrollableScrollPhysics(),
crossAxisCount: 2, itemBuilder: (context, index) {
crossAxisSpacing: 10, return InkResponse(
mainAxisSpacing: 10, onTap: () {
), switch (names[index]) {
physics: NeverScrollableScrollPhysics(), case "Generator Details":
itemBuilder: (context, index) { Navigator.push(
return InkResponse( context,
onTap: () { MaterialPageRoute(
switch (names[index]) { builder:
case "Generator Details": (context) => Scanentergeneratoridscreen(
Navigator.push( from: "Generator Details",
context, ),
MaterialPageRoute( ),
builder: );
(context) => Scanentergeneratoridscreen( break;
from: "Generator Details", case "Register Complaint":
), Navigator.push(
), context,
); MaterialPageRoute(
break; builder:
case "Register Complaint": (context) => Scanentergeneratoridscreen(
Navigator.push( from: "Register Complaint",
context, ),
MaterialPageRoute( ),
builder: );
(context) => Scanentergeneratoridscreen( break;
from: "Register Complaint", case "Tag Location":
), Navigator.push(
), context,
); MaterialPageRoute(
break; builder:
case "Tag Location": (context) => Scanentergeneratoridscreen(
Navigator.push( from: "Tag Location",
context, ),
MaterialPageRoute( ),
builder: );
(context) => Scanentergeneratoridscreen( break;
from: "Tag Location", case "Tag Generator":
), Navigator.push(
), context,
); MaterialPageRoute(
break; builder:
case "Tag Generator": (context) => Scanentergeneratoridscreen(
Navigator.push( from: "Tag Generator",
context, ),
MaterialPageRoute( ),
builder: );
(context) => Scanentergeneratoridscreen( break;
from: "Tag Generator",
),
),
);
break;
default: default:
print("111"); print("111");
break; break;
} }
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(30),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset("assets/svg/${icons[index]}.svg"),
SizedBox(height: 10),
Text(names[index]),
],
),
),
);
}, },
), child: Container(
), decoration: BoxDecoration(
SizedBox(height: 10), color: Colors.white,
Expanded( borderRadius: BorderRadius.circular(30),
flex: 3, ),
child: Padding( child: Column(
padding: const EdgeInsets.all(8.0), crossAxisAlignment: CrossAxisAlignment.center,
child: Text( mainAxisAlignment: MainAxisAlignment.center,
"Note: 'Tag Location' and 'Register Complaint' are moved to 'Generator Details'.", children: [
style: TextStyle(color: AppColors.grey_thick, SvgPicture.asset("assets/svg/${icons[index]}.svg"),
fontSize: 14), SizedBox(height: 10),
Text(names[index]),
],
),
), ),
), );
},
),
),
SizedBox(height: 10),
Expanded(
flex: 3,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Note: 'Tag Location' and 'Register Complaint' are moved to 'Generator Details'.",
style: TextStyle(color: AppColors.grey_thick, fontSize: 14),
), ),
SizedBox(height: 10), ),
],
), ),
), SizedBox(height: 10),
],
), ),
); );
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -27,7 +27,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -27,7 +27,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
onWillPop: () => onBackPressed(context), onWillPop: () => onBackPressed(context),
child: SafeArea( child: SafeArea(
top: false, top: false,
bottom: Platform.isIOS?false:true, bottom: Platform.isIOS ? false : true,
child: Scaffold( child: Scaffold(
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar(context, "Accounts"), appBar: appbar(context, "Accounts"),
...@@ -54,7 +54,10 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -54,7 +54,10 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
borderRadius: BorderRadius.circular(14), borderRadius: BorderRadius.circular(14),
border: border:
searchFocusNode.hasFocus searchFocusNode.hasFocus
? Border.all(color: AppColors.app_blue, width: 0.5) ? Border.all(
color: AppColors.app_blue,
width: 0.5,
)
: null, : null,
), ),
// alignment: Alignment.center, // alignment: Alignment.center,
...@@ -123,7 +126,9 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -123,7 +126,9 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
builder: builder:
(context) => Paymentdetails( (context) => Paymentdetails(
accountName: "Account", accountName: "Account",
name: accountList![index].accountName, name:
accountList![index]
.accountName,
genId: "", genId: "",
referenceID: referenceID:
accountList![index].accountId, accountList![index].accountId,
...@@ -135,7 +140,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -135,7 +140,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
child: SizedBox( child: SizedBox(
child: Container( child: Container(
width: width:
MediaQuery.of(context).size.width * 0.9, MediaQuery.of(context).size.width *
0.9,
padding: EdgeInsets.fromLTRB(0, 5, 0, 10), padding: EdgeInsets.fromLTRB(0, 5, 0, 10),
child: Row( child: Row(
children: [ children: [
...@@ -148,9 +154,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -148,9 +154,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFE6F6FF), color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular( borderRadius:
8, BorderRadius.circular(8),
),
), ),
child: SvgPicture.asset( child: SvgPicture.asset(
width: 30, width: 30,
...@@ -159,7 +164,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -159,7 +164,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
), ),
), ),
), ),
SizedBox(width: 10,), SizedBox(width: 10),
Expanded( Expanded(
flex: 5, flex: 5,
child: Text( child: Text(
...@@ -168,7 +173,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -168,7 +173,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
maxLines: 3, maxLines: 3,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: AppColors.semi_black color: AppColors.semi_black,
), ),
), ),
), ),
...@@ -189,7 +194,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -189,7 +194,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
physics: AlwaysScrollableScrollPhysics(), physics: AlwaysScrollableScrollPhysics(),
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height, height:
MediaQuery.of(context).size.height,
// Set width to fill parent width // Set width to fill parent width
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
...@@ -197,7 +203,12 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -197,7 +203,12 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
topRight: Radius.circular(30.0), topRight: Radius.circular(30.0),
), ),
), ),
padding: EdgeInsets.fromLTRB(10, 10, 10, 10), padding: EdgeInsets.fromLTRB(
10,
10,
10,
10,
),
child: Container( child: Container(
child: Align( child: Align(
alignment: Alignment.center, alignment: Alignment.center,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment