You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudsolutions-atoms/lib/new_views/common_widgets/test screen.dart

47 lines
1.1 KiB
Dart

import 'package:flutter/material.dart';
import 'package:test_sa/new_views/common_widgets/app_bar/custom_app_bar.dart';
import 'add_floating_button.dart';
import 'app_bar/home_app_bar.dart';
import 'bottom_nav_bar/home_bottom_nav_bar.dart';
class TestScreen extends StatefulWidget {
static const String id = '/test';
const TestScreen({Key key}) : super(key: key);
@override
State<TestScreen> createState() => _TestScreenState();
}
class _TestScreenState extends State<TestScreen> {
int screenIndex =0;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: HomeAppBar(),
body: Center(child: _widgetOptions[screenIndex]),
floatingActionButton: AddFloatingButton(onPressed: () {},),
bottomNavigationBar: HomeBottomNavigationBar(onPressed: (index){
setState(() {
screenIndex = index;
});
},),
);
}
static const List<Widget> _widgetOptions = <Widget>[
Text(
'Index 0',
),
Text(
'Index 1',
),
Text(
'Index 2',
),
Text(
'Index 3',
),
];
}