diff --git a/lib/myApp.dart b/lib/myApp.dart index 701ac2e..2f9d223 100644 --- a/lib/myApp.dart +++ b/lib/myApp.dart @@ -6,8 +6,12 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return const MaterialApp( + return MaterialApp( title: 'My App', + theme: ThemeData( + useMaterial3: true, + primaryColor: Colors.red, + ), home: Navigation() ); } diff --git a/lib/navigation.dart b/lib/navigation.dart index 1d5c343..ac724e9 100644 --- a/lib/navigation.dart +++ b/lib/navigation.dart @@ -1,6 +1,7 @@ import 'dart:ffi'; import 'package:flutter/material.dart'; +import 'testUI.dart'; class Navigation extends StatefulWidget { const Navigation({super.key}); @@ -11,9 +12,9 @@ class Navigation extends StatefulWidget { class _NavigationState extends State { - int _selectedIndex = 1; + int _selectedIndex = 0; static const List _widgetOptions = [ - Text("Calendar"), + TestUI(), Text("Inbox"), Text("Notes"), ]; diff --git a/lib/testUI.dart b/lib/testUI.dart new file mode 100644 index 0000000..0605f55 --- /dev/null +++ b/lib/testUI.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +class TestUI extends StatefulWidget { + const TestUI({super.key}); + + @override + State createState() => _TestUIState(); +} + +class _TestUIState extends State { + int _test = 0; + + void _onPressed() { + setState(() { + _test = 1; + }); + } + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Column(children: [ + FloatingActionButton(onPressed: _onPressed), + Text('$_test'), + ],), + ), + ); + } +}