Lost connection to device.
Error: Unable to terminate com.example.techtruckers on 6F10DFB3-58C8-44EB-B1BD-4196FB5BC903:
ProcessException: Process exited abnormally with exit code 3:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Simulator device failed to terminate com.example.techtruckers.
found nothing to terminate
Underlying error (domain=NSPOSIXErrorDomain, code=3):
The request to terminate "com.example.techtruckers" failed. found nothing to terminate
found nothing to terminate
Command: /usr/bin/arch -arm64e xcrun simctl terminate 6F10DFB3-58C8-44EB-B1BD-4196FB5BC903 com.example.techtruckers
the Dart compiler exited unexpectedly.
@override
Widget build(BuildContext context) {
BlocProvider.of(context);
// return Scaffold(body: Center(child: Text("ffffff")));
return PersistentTabView(
context,
screens: _buildScreens(),
items: _navBarsItems(),
confineInSafeArea: true,
backgroundColor: const Color(0XFF01AAE9), // Default is Colors.white.
handleAndroidBackButtonPress: true, // Default is true.
resizeToAvoidBottomInset: true, // This needs to be true if you want to move up the screen when keyboard appears. Default is true.
stateManagement: false, // Default is true.
hideNavigationBarWhenKeyboardShows: false, // Recommended to set 'resizeToAvoidBottomInset' as true while using this argument. Default is true.
decoration: NavBarDecoration(
borderRadius: BorderRadius.circular(0.0),
colorBehindNavBar: Colors.white,
),
popAllScreensOnTapOfSelectedTab: true,
popActionScreens: PopActionScreensType.all,
itemAnimationProperties: const ItemAnimationProperties( // Navigation Bar's items animation properties.
duration: Duration(milliseconds: 200),
curve: Curves.ease,
),
screenTransitionAnimation: const ScreenTransitionAnimation( // Screen transition animation on change of selected tab.
animateTabTransition: true,
curve: Curves.ease,
duration: Duration(milliseconds: 200),
),
navBarStyle: NavBarStyle.style12, // Choose the nav bar style with this property.
);
Lost connection to device. Error: Unable to terminate com.example.techtruckers on 6F10DFB3-58C8-44EB-B1BD-4196FB5BC903: ProcessException: Process exited abnormally with exit code 3: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3): Simulator device failed to terminate com.example.techtruckers. found nothing to terminate Underlying error (domain=NSPOSIXErrorDomain, code=3): The request to terminate "com.example.techtruckers" failed. found nothing to terminate found nothing to terminate Command: /usr/bin/arch -arm64e xcrun simctl terminate 6F10DFB3-58C8-44EB-B1BD-4196FB5BC903 com.example.techtruckers the Dart compiler exited unexpectedly.
// ignore_for_file: file_names, library_private_types_in_public_api
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:persistent_bottom_nav_bar/persistent_tab_view.dart';
import '../../bloc/themeCubit.dart'; import 'callData.dart'; import 'chatScreen.dart'; import 'homepage.dart'; import 'mapScreen.dart';
class MyNavigationBar extends StatefulWidget { const MyNavigationBar({super.key});
@override _MyNavigationBarState createState() => _MyNavigationBarState(); }
class _MyNavigationBarState extends State {
@override Widget build(BuildContext context) { BlocProvider.of(context);
// return Scaffold(body: Center(child: Text("ffffff")));
return PersistentTabView(
context,
screens: _buildScreens(),
items: _navBarsItems(),
confineInSafeArea: true,
backgroundColor: const Color(0XFF01AAE9), // Default is Colors.white.
handleAndroidBackButtonPress: true, // Default is true.
resizeToAvoidBottomInset: true, // This needs to be true if you want to move up the screen when keyboard appears. Default is true.
stateManagement: false, // Default is true.
hideNavigationBarWhenKeyboardShows: false, // Recommended to set 'resizeToAvoidBottomInset' as true while using this argument. Default is true.
decoration: NavBarDecoration(
borderRadius: BorderRadius.circular(0.0),
colorBehindNavBar: Colors.white,
),
popAllScreensOnTapOfSelectedTab: true,
popActionScreens: PopActionScreensType.all,
itemAnimationProperties: const ItemAnimationProperties( // Navigation Bar's items animation properties.
duration: Duration(milliseconds: 200),
curve: Curves.ease,
),
screenTransitionAnimation: const ScreenTransitionAnimation( // Screen transition animation on change of selected tab.
animateTabTransition: true,
curve: Curves.ease,
duration: Duration(milliseconds: 200),
),
navBarStyle: NavBarStyle.style12, // Choose the nav bar style with this property.
);
} }
List _navBarsItems() {
return [
PersistentBottomNavBarItem(
icon: const Icon(Icons.home,size: 35,),
inactiveIcon: const Icon(Icons.home),
title: ("Home"),
activeColorPrimary: CupertinoColors.white,
inactiveColorPrimary: CupertinoColors.white,
),
PersistentBottomNavBarItem(
icon: const Icon(Icons.map,size: 35,),
inactiveIcon: const Icon(Icons.map),
title: ("Map"),
activeColorPrimary: CupertinoColors.white,
inactiveColorPrimary: CupertinoColors.white,
),
PersistentBottomNavBarItem(
icon: const Icon(Icons.chat,size: 35,),
inactiveIcon: const Icon(Icons.chat),
title: ("Chat"),
activeColorPrimary: CupertinoColors.white,
inactiveColorPrimary: CupertinoColors.white,
),
PersistentBottomNavBarItem(
icon: const Icon(Icons.phone,size: 35,),
inactiveIcon: const Icon(Icons.phone),
title: ("Phone"),
activeColorPrimary: CupertinoColors.white,
inactiveColorPrimary: CupertinoColors.white,
),
];
}
List _buildScreens() {
return [
// DocumentScreen(),
const HomePage(),
const MapScreen(),
const ChatScreen(),
const RecentCallsScreen(),
];
}