mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 14:37:54 +00:00
Implemented Navigation to these screens:
- Home - Scene - Smart - profile Converted to state based Provider
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'profile_state.dart';
|
||||
|
||||
class ProfileProvider extends ChangeNotifier {
|
||||
final state = ProfileState();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class ProfileState {
|
||||
|
||||
ProfileState() {
|
||||
// init some variables
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -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 {}
|
||||
Reference in New Issue
Block a user