Change design

This commit is contained in:
Reimar 2024-09-03 09:47:07 +02:00
parent 61586ef169
commit e3a6171ed3
Signed by: Reimar
GPG Key ID: 93549FA07F0AE268

View File

@ -370,57 +370,65 @@ class _MyHomePageState extends State<MyHomePage> {
child: CupertinoSearchTextField( child: CupertinoSearchTextField(
controller: searchBarInput, controller: searchBarInput,
suffixMode: OverlayVisibilityMode.never, suffixMode: OverlayVisibilityMode.never,
backgroundColor: Colors.white.withOpacity(0.9),
placeholder: 'Search city based', placeholder: 'Search city based',
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Colors.white.withOpacity(0.9),
boxShadow: const [BoxShadow(color: Color(0x20000000), offset: Offset(0, 1), blurRadius: 4)]
),
), ),
), ),
], ],
), ),
Positioned( Positioned(
right: 2, // Position the button at the bottom-right right: 2, // Position the button at the bottom-right
bottom: 4.5, bottom: 4.5,
child: child:
SizedBox( SizedBox(
width: 100, width: 100,
height: 28, height: 28,
child: ElevatedButton( child: ElevatedButton(
onPressed: GetOpenStreetMapArea, onPressed: GetOpenStreetMapArea,
child: const Text('Search'), child: const Text('Search'),
), ),
), ),
), ),
], ],
), ),
), ),
), ),
), ),
Positioned( Positioned(
right: 2, right: 2,
bottom: 40, bottom: 50,
child: child:
SizedBox( SizedBox(
width: 50, width: 50,
height: 50, height: 50,
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
const Icon( const Icon(
Icons.circle, Icons.circle,
color: Colors.white, color: Colors.white,
size: 48.0, size: 48.0,
), shadows: [BoxShadow(color: Color(0x20000000), offset: Offset(0, 1), blurRadius: 4)],
IconButton( ),
Padding(
padding: const EdgeInsets.all(3),
child: IconButton(
icon: const Icon( icon: const Icon(
Icons.location_searching, Icons.location_searching,
color: Colors.blue, color: Colors.blue,
size: 36.0, size: 28.0,
), ),
onPressed: () { onPressed: () {
_getCurrentLocation(); _getCurrentLocation();
}, },
), ),
], ),
) ],
),
), ),
), ),
], ],
@ -430,7 +438,7 @@ class _MyHomePageState extends State<MyHomePage> {
} }
TileLayer get openStreetMapTileLayer => TileLayer( TileLayer get openStreetMapTileLayer => TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
userAgentPackageName: 'dev.fleaflet.flutter_map.example', userAgentPackageName: 'dev.fleaflet.flutter_map.example',
); );
} }