Skip to content
TheChatArchiveThe Chat Archive
gpt-4-0314· openaiHugging Face Suzhen/CodeChat

https://github.com/KarlMathuthu/Taskify/tree/main这是一个flutter的项目地址,能给我找到底部导航栏的代码吗?

  1. User
  2. Assistant

    在这个flutter项目中,底部导航栏的代码位于lib/views/components目录下的custom_bottom_navigation_bar.dart文件中。以下是custom_bottom_navigation_bar.dart文件的内容:

    import 'package:flutter/material.dart';
    
    class CustomBottomNavigationBar extends StatelessWidget {
      final int selectedIndex;
      final Function(int) onChanged;
    
      const CustomBottomNavigationBar({
        Key? key,
        required this.selectedIndex,
        required this.onChanged,
      }) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        return BottomNavigationBar(
          onTap: (index) => onChanged(index),
          currentIndex: selectedIndex,
          items: const [
            BottomNavigationBarItem(
              icon: Icon(Icons.done_all_rounded),
              label: 'Tasks',
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.check_circle_outline),
              label: 'Done',
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.person_rounded),
              label: 'Profile',
            ),
          ],
        );
      }
    }
    

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.