import 'package:app/extensions/obtainProviderExtension.dart'; import 'package:app/state/mapState.dart'; import 'package:app/view/legalStatus.dart'; import 'package:app/view/map.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class HomeView extends StatefulWidget { const HomeView({super.key}); @override State createState() => _HomePageState(); } class _HomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: const Text("Bubatzkarte"), actions: [], ), floatingActionButton: FloatingActionButton( child: Consumer(builder: (context, value, child) => Icon(value.followLocation ? Icons.my_location : Icons.location_disabled)), onPressed: () => context.obtainState().toggleLocationLock(), ), body: const Column( children: [ SizedBox( height: 100, child: LegalStatusView(), ), Expanded( child: MapView(), ) ], ), ); } }