elektronika/lib/app/pages/splash/screen.dart

78 lines
2.5 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../app.dart';
import 'controller.dart';
class LanguageSplashScreen extends StatelessWidget {
const LanguageSplashScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Material(
// color: Colors.amber,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/splash/splash_screen.png'),
fit: BoxFit.cover,
),
),
child: GetX<LangSplashController>(
init: LangSplashController(),
builder: (controller) => SafeArea(
child: Column(
children: [
Spacer(),
Text(
'select_language'.tr,
style: TextStyle(
fontSize: 18.sp,
color: Colors.white,
fontWeight: FontWeight.w600,
),
),
SizedBox(height: 20),
Container(
margin: EdgeInsets.symmetric(horizontal: 0.05.sw),
child: Row(
children: [
LangButton(
isTurkmen: true,
callback: (value) {
controller.onLangBtnTapped(value);
// debugPrint('$value');
},
isSelected: controller.isTurkmen.value == true,
),
LangButton(
isTurkmen: false,
callback: (value) {
controller.onLangBtnTapped(value);
// debugPrint('$value');
},
isSelected: controller.isTurkmen.value == false,
),
],
),
),
SizedBox(height: 100),
Container(
margin: EdgeInsets.symmetric(horizontal: 0.05.sw),
child: ColoredButton(
title: 'approve_lang'.tr,
btnColor: ThemeColor.mainColor,
callback: controller.onNextBtnTapped,
),
),
SizedBox(height: 20),
],
),
),
),
),
);
}
}