Bài đăng

Đang hiển thị bài đăng từ tháng 10 12, 2021

Flutter 7.2 - TabBar & BottomNavigationBar

 1, Tab bar:  class _TabScreenState extends State<TabScreen> { @override Widget build (BuildContext context) { return DefaultTabController ( length: 2 , // số tab child: Scaffold ( appBar: AppBar ( title: Text ( 'Meals' ) , bottom: TabBar ( tabs: [ Tab ( icon: Icon (Icons. category ) , text: 'Category' , ) , Tab ( icon: Icon (Icons. star ) , text: 'Favorites' , ) , ] , ) , ) , body: TabBarView ( children: [ CategoriesScreen () , FavoritesScreen () , ] , ) , )) ; } } 2, BottomNavigationBar class _TabScreenState extends State<TabScreen> { final List<Map<String , Object>> _pages = [ { 'title' : 'Categor...

Connect adb

1. cd [location]\Sdk\platform-tools 2. adb devices 3. adb tcpip 5555 4. adb connect [yourDeviceIP] Nếu xảy ra lỗi " No connection could be made because the target machine actively refused it " : 1. stay connect via USB 2. connect to your WIFI network (computer and mobile device both) 3.ping DeviceIP (must be have ping to your device) 4. adb kill-server 5.adb usb 6.adb tcpip 5555 *unplug usb cable (as per @captain_majid 's comment) 7. adb connect [yourDeviceIP] 8. adb devices (must be see two device names , one of them is by deviceIP) 9. unplug USB cable  In my case: E: cd androidsdk\Sdk\platform-tools adb devices adb tcpip 5555 adb connect [yourDeviceIP]