import 'package:flutter/material.dart'; import 'package:sliding_up_panel/sliding_up_panel.dart'; import 'package:fast_network_navigation/structs/trip.dart'; import 'package:fast_network_navigation/modules/landmarks_overview.dart'; import 'package:fast_network_navigation/modules/map.dart'; import 'package:fast_network_navigation/modules/greeter.dart'; class NavigationOverview extends StatefulWidget { final Future trip; NavigationOverview({ required this.trip }); @override State createState() => _NavigationOverviewState(); } class _NavigationOverviewState extends State { @override Widget build(BuildContext context) { return SlidingUpPanel( renderPanelSheet: false, panel: _floatingPanel(), collapsed: _floatingCollapsed(), body: MapWidget(trip: widget.trip) ); } Widget _floatingCollapsed(){ final ThemeData theme = Theme.of(context); return Container( decoration: BoxDecoration( color: theme.canvasColor, borderRadius: BorderRadius.only(topLeft: Radius.circular(24.0), topRight: Radius.circular(24.0)), boxShadow: [] ), child: Greeter(standalone: true, trip: widget.trip) ); } Widget _floatingPanel(){ final ThemeData theme = Theme.of(context); return Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(24.0)), boxShadow: [ BoxShadow( blurRadius: 20.0, color: theme.shadowColor, ), ] ), child: Center( child: Padding( padding: EdgeInsets.all(8.0), child: SingleChildScrollView( child: Column( children: [ Greeter(standalone: false, trip: widget.trip), LandmarksOverview(trip: widget.trip), ], ), ), ), ), ); } }