83 lines
1.9 KiB
Dart
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)
|
|
]
|
|
)
|
|
)
|
|
],
|
|
);
|
|
}
|
|
}
|