import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'TelNow Lat', theme: ThemeData( useMaterial3: true, colorScheme: ColorScheme.fromSeed(seedColor: Color.fromARGB(255, 0, 255, 255)), ), home: MyHomePage(), ); } } class MyHomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Theme.of(context).colorScheme.primaryContainer, body: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Lang(), Expanded( child: Center( child: Text('TelNow', style: TextStyle(color: Colors.orange, fontSize: 48), ) ), ), Padding( padding: const EdgeInsets.only(left: 120, right: 120), child: Text('Silakan pindai QR terlebih dulu untuk mulai menggunakan aplikasi.', softWrap: true, textAlign: TextAlign.center, ), ), Expanded(child: Center(child: Pindai()), ), Text('Kebijakan Privasi'), Text('Versi 4.0.0.0'), Container( color: Theme.of(context).colorScheme.primaryContainer, ) ], ), ); } } class Lang extends StatefulWidget { const Lang({ Key? key, }) : super(key: key); @override State createState() => _LangState(); } class _LangState extends State { var selectedIndex = 0; @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.all(8.0), child: Row( children: [ Expanded(child: Container()), ElevatedButton (onPressed: (){print('EN');}, child: Text('EN'), ), ElevatedButton (onPressed: (){print('ID');}, child: Text('ID')) ], ), ); } } // class Judul extends StatelessWidget { // const Judul({ // Key? key, // }) : super(key: key); // @override // Widget build(BuildContext context) { // var theme = Theme.of(context); // var style = theme.textTheme.displayMedium!.copyWith( // color: Colors.orange, // ); // return Column( // children: [ // Text('TelNow', style: style), // ], // ); // } // } class Pindai extends StatelessWidget { const Pindai({ Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Card( child: Padding( padding: const EdgeInsets.all(20), child: TextButton( onPressed: () { print('QR pressed!'); }, child: Text('Pindai QR'), ), ), ); } } // class Footer extends StatelessWidget { // const Footer({ // Key? key, // }) : super(key: key); // @override // Widget build(BuildContext context) { // return Column( // children: [ // Text('Kebijakan Privasi'), // Text('Versi 4.0.0.0'), // ], // ); // } // }