first
This commit is contained in:
42
lib/views/lang/languages.dart
Normal file
42
lib/views/lang/languages.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../controller/local/local_controller.dart';
|
||||
import '../home/home_page.dart';
|
||||
|
||||
class Language extends GetView<LocaleController> {
|
||||
const Language({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Text("Choose Language".tr,
|
||||
style: Theme.of(context).textTheme.headlineLarge),
|
||||
const SizedBox(height: 20),
|
||||
MyElevatedButton(
|
||||
title: 'Ar',
|
||||
onPressed: () {
|
||||
controller.changeLang("ar");
|
||||
Get.offAll(() => HomePage());
|
||||
},
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: "En",
|
||||
onPressed: () {
|
||||
controller.changeLang("en");
|
||||
Get.offAll(() => HomePage());
|
||||
},
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user