ontimehaulers/lib/screens/track_screen.dart

32 lines
933 B
Dart
Raw Normal View History

2024-11-05 12:29:06 +00:00
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,
),
);
}
}