Files
tripz/lib/views/lang/languages.dart
Hamza-Ayed 5a7c09eb06 first
2023-08-04 15:06:57 +03:00

43 lines
1.3 KiB
Dart

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());
},
),
],
)),
),
);
}
}