import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:pwa_ios/utils/apicall.dart'; import 'package:pwa_ios/main.dart'; import 'package:pwa_ios/views/interaction_module/interaction_screen.dart'; import 'package:pwa_ios/views/interaction_module/interactionlistscreen.dart'; import 'package:pwa_ios/views/konectarpage.dart'; import 'package:pwa_ios/views/notification_screen.dart'; import 'package:pwa_ios/views/notifications.dart'; import 'package:pwa_ios/views/profile.dart'; import 'package:pwa_ios/views/webview_example.dart'; class HomeScreen extends StatefulWidget { const HomeScreen({super.key}); @override State createState() => _HomeScreenState(); } class _HomeScreenState extends State { int _selectedIndex = 0; void _onItemTapped(int index) { setState(() { _selectedIndex = index; }); } @override void initState() { // TODO: implement initState super.initState(); // WidgetsBinding.instance.addPostFrameCallback((timeStamp) { // init(); // }); } init() async { await ApiCall().parseInfo(); } @override Widget build(BuildContext context) { return Scaffold( bottomNavigationBar: BottomNavigationBar( type: BottomNavigationBarType.fixed, currentIndex: _selectedIndex, //backgroundColor: Color.fromARGB(255, 35, 79, 150), selectedItemColor: Color.fromARGB(255, 35, 79, 150), unselectedItemColor: Color.fromARGB(255, 153, 153, 163), iconSize: 40, onTap: _onItemTapped, elevation: 1, items: [ BottomNavigationBarItem( icon: Container( width: 30, height: 30, child: Image.asset( "assets/images/konectar.png", ), ), label: 'Konectar', backgroundColor: Color.fromARGB(255, 168, 170, 173)), // const BottomNavigationBarItem( // icon: Icon( // Icons.notifications, // size: 30, // ), // label: 'Notifications', // backgroundColor: Colors.blue, // ), const BottomNavigationBarItem( icon: Icon( Icons.edit_document, size: 30, ), label: 'Add Record', backgroundColor: Colors.blue, ), const BottomNavigationBarItem( icon: Icon( Icons.settings, size: 30, ), label: 'Settings', backgroundColor: Color.fromARGB(255, 168, 170, 173), ), ]), body: _selectedIndex == 0 ? const MyApp() : _selectedIndex == 1 ? const InteractionListScreen() : const ProfileScreen(), ); } }