Implemented Navigation to these screens:

- Home
- Scene
- Smart
- profile

Converted to state based Provider
This commit is contained in:
Mohammad Salameh
2024-02-14 15:49:06 +03:00
parent 3f1f8e72b3
commit 4d8a2655e1
22 changed files with 146 additions and 116 deletions
@@ -0,0 +1,7 @@
import 'package:flutter/material.dart';
import 'profile_state.dart';
class ProfileProvider extends ChangeNotifier {
final state = ProfileState();
}
+6
View File
@@ -0,0 +1,6 @@
class ProfileState {
ProfileState() {
// init some variables
}
}
@@ -1,17 +1,17 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../provider/profile_provider.dart';
import 'profile_provider.dart';
class ProfileView extends StatelessWidget {
const ProfileView({super.key});
class ProfilePage extends StatelessWidget {
const ProfilePage({super.key});
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider(
create: (BuildContext context) => ProfileProvider(),
builder: (context, child) => const Center(
child: Text('Profile'),
child: Text('Profile Page'),
),
);
}
@@ -1,3 +0,0 @@
import 'package:flutter/material.dart';
class ProfileProvider extends ChangeNotifier {}