akwap 0.0.1 akwap: ^0.0.1 copied to clipboard
A database of Uganda's districts, counties, sub-counties, parishes and villages.
import 'package:akwap_app/location.dart';
import 'package:flutter/material.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
inputDecorationTheme:
const InputDecorationTheme(border: OutlineInputBorder()),
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
late final GlobalKey<FormState> _formKey = GlobalKey();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Location Selector'),
),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Form(key: _formKey, child: const LocationSelector()),
const SizedBox(height: 8),
ElevatedButton(
onPressed: () {
_formKey.currentState?.validate();
},
child: const Text("Submit"),
)
],
),
),
);
}
}