import 'package:flutter/material.dart'; import 'package:ontime_haulers/widgets/custom_navigation_bar.dart'; import 'package:webview_flutter/webview_flutter.dart'; class TrackScreen extends StatelessWidget { final int selectedIndex; final void Function(int) onItemTapped; final controller = WebViewController() ..setJavaScriptMode(JavaScriptMode.unrestricted) ..loadFlutterAsset('assets/tracking.html'); TrackScreen({ super.key, required this.selectedIndex, required this.onItemTapped, }); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Tracking'), backgroundColor: Colors.red, foregroundColor: Colors.white, ), body: WebViewWidget(controller: controller), bottomNavigationBar: CustomNavigationBar( selectedIndex: selectedIndex, onItemTapped: onItemTapped, ), ); } }