splash screen set up
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 70 B |
|
Before Width: | Height: | Size: 70 B |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 70 B |
|
|
@ -3,4 +3,7 @@
|
|||
<item>
|
||||
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 70 B |
|
|
@ -3,4 +3,7 @@
|
|||
<item>
|
||||
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
|
|
|
|||
|
|
@ -2,17 +2,16 @@
|
|||
"images" : [
|
||||
{
|
||||
"filename" : "background.png",
|
||||
"idiom" : "universal"
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "darkbackground.png",
|
||||
"idiom" : "universal"
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 70 B |
|
Before Width: | Height: | Size: 70 B |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 134 KiB |
|
|
@ -38,7 +38,7 @@
|
|||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
<image name="LaunchImage" width="1106" height="986"/>
|
||||
<image name="LaunchBackground" width="1" height="1"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -48,6 +48,6 @@
|
|||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<false/>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
|
|
@ -59,9 +59,9 @@ Future<T?> _picker<T, R>({
|
|||
|
||||
Future<String?> languagePicker(BuildContext context, String groupValue) {
|
||||
var radios = [
|
||||
Radio(name: 'Türkmen', value: 'tk', groupValue: groupValue),
|
||||
Radio(name: 'Русский', value: 'ru', groupValue: groupValue),
|
||||
Radio(name: 'English', value: 'en', groupValue: groupValue),
|
||||
Radio(name: 'Türkmen', value: 'tk', groupValue: groupValue),
|
||||
];
|
||||
return _picker<String, Radio>(
|
||||
context: context,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ void showSnackBar(
|
|||
vertical: 10.adaptedPx(),
|
||||
horizontal:
|
||||
7.adaptedPx() + GlobalVariables.horizontalPadding(ctx)),
|
||||
duration: duration ?? const Duration(seconds: 2),
|
||||
duration: duration ?? const Duration(seconds: 5),
|
||||
backgroundColor: backgroundColor ?? AppTheme.lightPrimaryColor,
|
||||
content: Row(
|
||||
children: [
|
||||
|
|
@ -50,9 +50,7 @@ Future<bool> yesOrNoDialog(BuildContext context,
|
|||
return AlertDialog(
|
||||
title: Text(MaterialLocalizations.of(context).alertDialogLabel),
|
||||
titleTextStyle: Theme.of(context).textTheme.bodyLarge?.copyWith(
|
||||
fontFamily: 'Gilroy',
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 17.adaptedPx()),
|
||||
fontWeight: FontWeight.w500, fontSize: 17.adaptedPx()),
|
||||
titlePadding: EdgeInsets.all(18.adaptedPx()),
|
||||
actions: [
|
||||
Theme(
|
||||
|
|
@ -67,7 +65,6 @@ Future<bool> yesOrNoDialog(BuildContext context,
|
|||
MaterialLocalizations.of(context).continueButtonLabel,
|
||||
style: TextStyle(
|
||||
fontSize: 12.adaptedPx(),
|
||||
fontFamily: 'Gilroy',
|
||||
),
|
||||
)),
|
||||
),
|
||||
|
|
@ -100,7 +97,7 @@ Future<bool> yesOrNoDialog(BuildContext context,
|
|||
content ?? "",
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyText2!
|
||||
.bodyMedium!
|
||||
.copyWith(
|
||||
fontFamily: 'Gilroy',
|
||||
),
|
||||
|
|
|
|||
|
|
@ -123,44 +123,6 @@ class _LoginScreenState extends State<RegisterScreen> {
|
|||
prefixTxt: 'your_phone_number'.translation,
|
||||
inputFormatters: [maskFormatterPhone],
|
||||
),
|
||||
// Row(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// flex: 1,
|
||||
// child: Container(
|
||||
// alignment: Alignment.center,
|
||||
// height: GlobalVariables.deviceHeight(context) / 17,
|
||||
// decoration: BoxDecoration(
|
||||
// color: AppTheme.lightTextColor.withOpacity(0.2),
|
||||
// borderRadius: BorderRadius.circular(10.adaptedPx()),
|
||||
// ),
|
||||
// child: Text(
|
||||
// '+993',
|
||||
// textAlign: TextAlign.center,
|
||||
// style: Theme.of(context)
|
||||
// .primaryTextTheme
|
||||
// .bodyMedium
|
||||
// ?.copyWith(
|
||||
// color: AppTheme.blackColor,
|
||||
// fontSize: 16.adaptedPx(),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// flex: 5,
|
||||
// child: CustomTextField(
|
||||
// controller: phoneController,
|
||||
// labelText: 'your_phone_number'.translation,
|
||||
// hintText: '64 283513',
|
||||
// obscureText: false,
|
||||
// isPassword: false,
|
||||
// inputType: TextInputType.phone,
|
||||
// contentPadding: 0,
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 15.adaptedPx()),
|
||||
child: CustomTextField(
|
||||
|
|
|
|||
|
|
@ -230,8 +230,6 @@ class _DetailsState extends State<Details> {
|
|||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
const Spacer(),
|
||||
InkWell(
|
||||
splashColor: AppTheme.lightPrimaryColor.withOpacity(0.2),
|
||||
highlightColor:
|
||||
|
|
@ -255,33 +253,38 @@ class _DetailsState extends State<Details> {
|
|||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.adaptedPx(),
|
||||
color: AppTheme.lightPrimaryColor,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(15.adaptedPx()),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 15.adaptedPx(),
|
||||
horizontal: 15.adaptedPx(),
|
||||
),
|
||||
child: Text(
|
||||
'add_to_cart'.translation,
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium
|
||||
?.copyWith(
|
||||
fontSize: 15.adaptedPx(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppTheme.lightPrimaryColor,
|
||||
),
|
||||
),
|
||||
child: CustomButton(
|
||||
name: 'add_to_cart'.translation,
|
||||
onTap: () {},
|
||||
backgroundColor: AppTheme.lightPrimaryColor,
|
||||
isMain: true,
|
||||
),
|
||||
// Container(
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border.all(
|
||||
// width: 1.adaptedPx(),
|
||||
// color: AppTheme.lightPrimaryColor,
|
||||
// ),
|
||||
// borderRadius: BorderRadius.circular(15.adaptedPx()),
|
||||
// ),
|
||||
// padding: EdgeInsets.symmetric(
|
||||
// vertical: 15.adaptedPx(),
|
||||
// horizontal: 15.adaptedPx(),
|
||||
// ),
|
||||
// child: Text(
|
||||
// 'add_to_cart'.translation,
|
||||
// textAlign: TextAlign.center,
|
||||
// style: Theme.of(context)
|
||||
// .primaryTextTheme
|
||||
// .bodyMedium
|
||||
// ?.copyWith(
|
||||
// fontSize: 15.adaptedPx(),
|
||||
// fontWeight: FontWeight.w600,
|
||||
// color: AppTheme.lightPrimaryColor,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
),
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -41,10 +41,13 @@ class _ContactsScreenState extends State<ContactsScreen> {
|
|||
hasActionButton: true,
|
||||
title: 'contacts'.translation,
|
||||
badge: '2',
|
||||
leadingButton: SvgPicture.asset('assets/icons/menu.svg'),
|
||||
leadingButton: const Icon(
|
||||
Icons.arrow_back,
|
||||
color: AppTheme.blackColor,
|
||||
),
|
||||
actionButton: SvgPicture.asset('assets/icons/cart.svg'),
|
||||
leadingOnTap: () {
|
||||
_key.currentState?.openDrawer();
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
actionOnTap: () {},
|
||||
),
|
||||
|
|
@ -107,7 +110,7 @@ class _ContactsScreenState extends State<ContactsScreen> {
|
|||
color: AppTheme.lightPrimaryColor,
|
||||
),
|
||||
title: Text(
|
||||
'our_location',
|
||||
'our_location'.translation,
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||
fontSize: 15.adaptedPx(),
|
||||
fontWeight: FontWeight.w600,
|
||||
|
|
|
|||
|
|
@ -145,9 +145,9 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
|||
|
||||
if (lang != null) {
|
||||
await settings.setLanguage(lang);
|
||||
Navigator.of(context, rootNavigator: true)
|
||||
.pushNamedAndRemoveUntil('/home', (route) => false);
|
||||
}
|
||||
Navigator.of(context, rootNavigator: true)
|
||||
.pushNamedAndRemoveUntil('/home', (route) => false);
|
||||
},
|
||||
width: 22.adaptedPx(),
|
||||
height: 22.adaptedPx(),
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ Future<void> main() async {
|
|||
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
||||
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
|
||||
Future.delayed(const Duration(seconds: 5));
|
||||
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
await SettingsModel.initLocalization(
|
||||
prefs.getString('language') ?? kDefaultLanguage);
|
||||
|
|
@ -54,7 +55,7 @@ class _MyAppState extends State<MyApp> {
|
|||
debugShowCheckedModeBanner: false,
|
||||
theme: AppTheme.appLightTheme,
|
||||
title: 'Sapaly Mahabat',
|
||||
initialRoute: '/login',
|
||||
initialRoute: '/home',
|
||||
onGenerateRoute: (settings) => generateRoute(settings),
|
||||
routes: <String, WidgetBuilder>{
|
||||
'/drawer': (context) => SapalyDrawer(),
|
||||
|
|
|
|||