anyway/frontend/lib/pages/overview.dart
Remy Moll c87a01b2e8
All checks were successful
Build and push docker image / Build (pull_request) Successful in 1m54s
Build and release APK / Build APK (pull_request) Successful in 5m32s
overhaul using a trip struct that notifies its ui dependencies
2024-08-03 17:17:48 +02:00

83 lines
1.9 KiB
Dart

import 'package:flutter/material.dart';
import 'package:sliding_up_panel/sliding_up_panel.dart';
import 'package:anyway/structs/trip.dart';
import 'package:anyway/modules/landmarks_overview.dart';
import 'package:anyway/modules/map.dart';
import 'package:anyway/modules/greeter.dart';
class NavigationOverview extends StatefulWidget {
final Trip trip;
NavigationOverview({
required this.trip,
});
@override
State<NavigationOverview> createState() => _NavigationOverviewState();
}
class _NavigationOverviewState extends State<NavigationOverview> {
@override
Widget build(BuildContext context) {
return SlidingUpPanel(
panel: _floatingPanel(),
// collapsed: _floatingCollapsed(),
body: MapWidget(trip: widget.trip),
// renderPanelSheet: false,
// backdropEnabled: true,
maxHeight: MediaQuery.of(context).size.height * 0.8,
padding: EdgeInsets.all(10),
// panelSnapping: false,
borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)),
boxShadow: [
BoxShadow(
blurRadius: 20.0,
color: Colors.black,
)
],
);
}
Widget _floatingCollapsed(){
return Greeter(
trip: widget.trip
);
}
Widget _floatingPanel(){
return Column(
children: [
Padding(
padding: const EdgeInsets.all(15),
child:
Center(
child: Container(
width: 40,
height: 5,
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.all(Radius.circular(12.0)),
),
),
),
),
Expanded(
child: ListView(
children: [
Greeter(trip: widget.trip),
LandmarksOverview(trip: widget.trip)
]
)
)
],
);
}
}