diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index be4a01e..4c04832 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,21 +1,13 @@ - + - - + + + + @@ -23,8 +15,6 @@ - + diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index d23770e..779f777 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -4,3 +4,4 @@ distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip + diff --git a/android/settings_aar.gradle b/android/settings_aar.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/android/settings_aar.gradle @@ -0,0 +1 @@ +include ':app' diff --git a/lib/actions/messaging_actions.dart b/lib/actions/messaging_actions.dart new file mode 100644 index 0000000..08235f7 --- /dev/null +++ b/lib/actions/messaging_actions.dart @@ -0,0 +1,13 @@ +class AddMessage { + final payload; + + AddMessage(this.payload); +} + +class AddAllMessages { + final payload; + + AddAllMessages(this.payload); +} + +class DeleteAllMessages {} diff --git a/lib/screens/app_base_screen.dart b/lib/screens/app_base_screen.dart new file mode 100644 index 0000000..dc591e8 --- /dev/null +++ b/lib/screens/app_base_screen.dart @@ -0,0 +1,190 @@ +import 'package:digamobile/screens/fragments/navigation_drawers/navigation_drawer.dart'; +import 'package:digamobile/screens/fragments/templates/destination_view.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_inner_drawer/inner_drawer.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:line_awesome_icons/line_awesome_icons.dart'; + +import 'home_page.dart'; + +class AppBase extends StatefulWidget { + AppBase({Key key, this.isLoggedIn}) : super(key: key); + final isLoggedIn; + @override + _AppBaseState createState() => _AppBaseState(); +} + +class _AppBaseState extends State with TickerProviderStateMixin { + final GlobalKey _innerDrawerKey = + GlobalKey(); + + bool _onTapToClose = false; + bool _swipe = true; + bool _tapScaffold = true; + bool _isChatEnabled = true; + InnerDrawerAnimation _animationType = InnerDrawerAnimation.static; + double _offset = 0.4; + + AnimationController _controller; + Animation _drawerState; + + double _dragUpdate = 0; + int _index = 0; + InnerDrawerDirection _direction = InnerDrawerDirection.start; + + Color pickerColor = Color(0xff443a49); + Color currentColor = Colors.black54; + ValueChanged onColorChanged; + +//navigation state + List _faders; + List _destinationKeys; + + // Custom navigator takes a global key if you want to access the + // navigator from outside it's widget tree subtree + GlobalKey navigatorKey = GlobalKey(); + + @override + void initState() { + print("@@@@----MAIN____APPP____INIT___STATE"); + _controller = + AnimationController(vsync: this, duration: Duration(milliseconds: 500)); + _drawerState = Tween(begin: 0.0, end: 1.0).animate(_controller); + _controller.addListener(() { + print("animating ${_drawerState.value}"); + + print("Clicked"); + _direction = InnerDrawerDirection.start; + setState(() => _dragUpdate = _drawerState.value); + }); + _drawerState.addListener(() { + setState(() { + print("Clicked"); + this._dragUpdate = _drawerState.value; + }); + }); + _faders = + allDestinations.map((PageDestination destination) { + return AnimationController( + vsync: this, duration: Duration(milliseconds: 500)); + }).toList(); + _faders[_index].value = 1.0; + _destinationKeys = + List.generate(allDestinations.length, (int index) => GlobalKey()) + .toList(); + + super.initState(); + } + + @override + void dispose() { + for (AnimationController controller in _faders) controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: InnerDrawer( + key: _innerDrawerKey, + onTapClose: _onTapToClose, + tapScaffoldEnabled: _tapScaffold, + + offset: IDOffset.horizontal(_offset), + swipe: _swipe, + boxShadow: _direction == InnerDrawerDirection.start && + _animationType == InnerDrawerAnimation.linear + ? [] + : null, + colorTransition: currentColor, + leftAnimationType: _animationType, + rightAnimationType: InnerDrawerAnimation.linear, + leftChild: NavigationDrawer( + dragUpdate: _dragUpdate, + isSignedIn: widget.isLoggedIn, + ), + + //rightChild: MapFilterDrawer(), + + onDragUpdate: (double val, InnerDrawerDirection direction) { + _direction = direction; + setState(() => _dragUpdate = val); + }, + //innerDrawerCallback: (a) => print(a), + scaffold: Scaffold( + floatingActionButton: _isChatEnabled + ? null + : FloatingActionButton.extended( + onPressed: () {}, + label: Text("Appointment"), + icon: Icon( + Icons.add, + color: allDestinations[_index].materialColorLight, + ), + ), + floatingActionButtonLocation: + FloatingActionButtonLocation.centerDocked, + extendBody: false, + bottomNavigationBar: BottomNavigationBar( + //type: BottomNavigationBarType.fixed, + selectedIconTheme: IconThemeData(size: 26), + selectedItemColor: allDestinations[_index].materialColor, + unselectedItemColor: Colors.grey.shade900, + showUnselectedLabels: true, + onTap: (index) { + // navigatorKey.currentState.maybePop(); + setState(() => _index = index); + }, + currentIndex: _index, + items: allDestinations + .map((pageDestination) { + return BottomNavigationBarItem( + icon: Icon(pageDestination.icon), + activeIcon: Icon(pageDestination.activeIcon), + backgroundColor: pageDestination.materialColor, + title: Text(pageDestination.title)); + }).toList(), + ), + body: Stack( + fit: StackFit.expand, + children: allDestinations.map((PageDestination destination) { + final Widget view = FadeTransition( + opacity: _faders[destination.index] + .drive(CurveTween(curve: Curves.fastOutSlowIn)), + child: KeyedSubtree( + key: _destinationKeys[destination.index], + child: _index == 0 + ? HomePage( + "Welcome", + menuClicked: () { + print("clicked in base"); + _controller.status == AnimationStatus.completed || + _controller.status == + AnimationStatus.reverse + ? _controller.forward() + : _controller.reverse(); + _controller.forward(); + }, + ) + : DestinationView( + destination: destination, + ), + ), + ); + if (destination.index == _index) { + _faders[destination.index].forward(); + return view; + } else { + _faders[destination.index].reverse(); + if (_faders[destination.index].isAnimating) { + return IgnorePointer(child: view); + } + return Offstage(child: view); + } + }).toList(), + )), + ), + ); + } +} diff --git a/lib/screens/authentication_service.dart b/lib/screens/authentication_service.dart index f5fc8ae..8f551ad 100644 --- a/lib/screens/authentication_service.dart +++ b/lib/screens/authentication_service.dart @@ -1,4 +1,5 @@ import 'package:digamobile/login_screen.dart'; +import 'package:digamobile/screens/app_base_screen.dart'; import 'package:digamobile/screens/home_page.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; @@ -17,7 +18,9 @@ class AuthenticationService extends StatelessWidget { stream: FirebaseAuth.instance.onAuthStateChanged, builder: (context, snapshot) { if (snapshot.hasData) { - return HomePage(title); + return AppBase( + isLoggedIn: true, + ); } else { return LoginScreen(); } @@ -26,4 +29,4 @@ class AuthenticationService extends StatelessWidget { ), ); } -} \ No newline at end of file +} diff --git a/lib/screens/fragments/chat_fragment.dart b/lib/screens/fragments/chat_fragment.dart new file mode 100644 index 0000000..0ce32d8 --- /dev/null +++ b/lib/screens/fragments/chat_fragment.dart @@ -0,0 +1,39 @@ +import 'dart:async'; +import 'package:flutter_webview_plugin/flutter_webview_plugin.dart'; +import 'package:digamobile/screens/fragments/templates/destination_view.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ChatFragment extends StatefulWidget { + final PageDestination destination; + + const ChatFragment({ + Key key, + this.destination, + }) : super(key: key); + @override + _ChatFragmentState createState() => _ChatFragmentState(); +} + +class _ChatFragmentState extends State { + @override + Future initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return new WebviewScaffold( + url: + "https://webchat.snatchbot.me/e30deda7335903ce072120872201193e4e9dac8004f8f2c770a6e3cb297bf8de", + appBar: new AppBar( + title: const Text('Diga Assistant'), + ), + withZoom: true, + withLocalStorage: true, + hidden: true, + initialChild: + Center(child: Container(child: CircularProgressIndicator())), + ); + } +} diff --git a/lib/screens/fragments/navigation_drawers/navigation_drawer.dart b/lib/screens/fragments/navigation_drawers/navigation_drawer.dart new file mode 100644 index 0000000..0f071f8 --- /dev/null +++ b/lib/screens/fragments/navigation_drawers/navigation_drawer.dart @@ -0,0 +1,234 @@ +import 'dart:ui'; + +import 'package:flutter/material.dart'; +import 'package:line_awesome_icons/line_awesome_icons.dart'; + +import '../../../auth_service.dart'; + +class NavigationDrawer extends StatelessWidget { + NavigationDrawer({Key key, this.dragUpdate: 0, this.isSignedIn: false}) + : super(key: key); + final double dragUpdate; + final isSignedIn; + final hasRated = false; + @override + Widget build(BuildContext context) { + return Container( + child: Material( + child: Stack( + children: [ + Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topRight, + end: Alignment.bottomLeft, + colors: [ + ColorTween( + begin: Colors.blueAccent, + end: Colors.blueGrey[400].withRed(100), + ).lerp(dragUpdate), + ColorTween( + begin: Colors.green, + end: Colors.blueGrey[800].withGreen(80), + ).lerp(dragUpdate), + ], + ), + ), + child: Stack( + fit: StackFit.expand, + children: [ + Padding( + padding: EdgeInsets.only(left: 30), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Column( + children: [ + Container( + margin: EdgeInsets.only( + left: 10, bottom: 15, top: 72), + width: 80, + child: ClipRRect( + child: Container( + height: 90, + width: 90, + color: Colors.blueAccent, + ), + borderRadius: BorderRadius.circular(50), + ), + ), + Text( + "User", + style: + TextStyle(color: Colors.white, fontSize: 18), + ) + ], + //mainAxisAlignment: MainAxisAlignment.center, + ), + Padding( + padding: EdgeInsets.all(10), + ), + Material( + color: Colors.transparent, + child: InkWell( + onTap: () => print("Rate us"), + child: ListTile( + title: Text( + "Rate", + style: TextStyle( + color: Colors.white, fontSize: 14), + ), + leading: Icon( + hasRated + ? LineAwesomeIcons.star + : LineAwesomeIcons.star_o, + color: Colors.white, + size: 22, + ))), + ), + Padding( + padding: const EdgeInsets.only(top: 12.0), + child: Container( + height: 1, + color: Colors.grey, + ), + ), + Material( + color: Colors.transparent, + child: InkWell( + onTap: () => print("My Account"), + child: ListTile( + title: Text( + "My Account", + style: TextStyle( + color: Colors.white, fontSize: 14), + ), + leading: Icon( + LineAwesomeIcons.lock, + color: Colors.white, + size: 22, + ))), + ), + Material( + color: Colors.transparent, + child: InkWell( + onTap: () => print("Settings"), + child: ListTile( + title: Text( + "Settings", + style: TextStyle( + color: Colors.white, fontSize: 14), + ), + leading: Icon( + LineAwesomeIcons.cog, + color: Colors.white, + size: 22, + ))), + ), + Material( + color: Colors.transparent, + child: InkWell( + onTap: () => print("Help"), + child: ListTile( + title: Text( + "Help", + style: TextStyle( + color: Colors.white, fontSize: 14), + ), + leading: Icon( + LineAwesomeIcons.info_circle, + color: Colors.white, + size: 22, + ))), + ), + Material( + color: Colors.transparent, + child: InkWell( + onTap: () => print("Contact us"), + child: ListTile( + title: Text( + "Contact", + style: TextStyle( + color: Colors.white, fontSize: 14), + ), + leading: Icon( + Icons.mail_outline, + color: Colors.white, + size: 22, + ))), + ), + Padding( + padding: + const EdgeInsets.only(top: 24.0, bottom: 24.0), + child: Container( + height: 1, + color: Colors.grey, + ), + ), + isSignedIn + ? Padding( + padding: const EdgeInsets.only(bottom: 18.0), + child: Material( + color: Colors.transparent, + child: InkWell( + onTap: () => AuthService().signOut(), + child: ListTile( + title: Text( + "Sign Out", + style: TextStyle( + color: Colors.white, + fontSize: 16), + ), + leading: Icon( + Icons.exit_to_app, + color: Colors.white, + size: 22, + ))), + ), + ) + : Padding( + padding: const EdgeInsets.only(bottom: 18.0), + child: Material( + color: Colors.transparent, + child: InkWell( + onTap: () => print("Sign in"), + child: ListTile( + title: Text( + "Log in", + style: TextStyle( + color: Colors.white, + fontSize: 16), + ), + leading: Icon( + Icons.person_outline, + color: Colors.white, + size: 22, + ))), + ), + ), + ], + ), + ), + ), + ], + ), + ), + dragUpdate < 1 + ? BackdropFilter( + filter: ImageFilter.blur( + sigmaX: (10 - dragUpdate * 10), + sigmaY: (10 - dragUpdate * 10)), + child: Container( + decoration: BoxDecoration( + color: Colors.black.withOpacity(0), + ), + ), + ) + : null, + ].where((a) => a != null).toList(), + )), + ); + } +} diff --git a/lib/screens/fragments/templates/destination_view.dart b/lib/screens/fragments/templates/destination_view.dart new file mode 100644 index 0000000..1fef7bc --- /dev/null +++ b/lib/screens/fragments/templates/destination_view.dart @@ -0,0 +1,177 @@ +import 'package:digamobile/styles/constants.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:line_awesome_icons/line_awesome_icons.dart'; + +class DestinationView extends StatefulWidget { + DestinationView({Key key, this.destination}) : super(key: key); + final PageDestination destination; + + @override + _DestinationViewState createState() => _DestinationViewState(); +} + +class PageDestination { + final index; + final String title; + final IconData icon; + final IconData activeIcon; + final MaterialColor materialColor; + final Color materialColorLight; + + const PageDestination( + this.title, this.materialColor, this.icon, this.activeIcon, this.index, + {this.materialColorLight: Colors.white}); +} + +class _DestinationViewState extends State { + @override + Widget build(BuildContext context) { + return Navigator( + onGenerateRoute: (RouteSettings settings) { + return MaterialPageRoute( + settings: settings, + builder: (BuildContext context) { + switch (settings.name) { + case '/': + return RootPage(destination: widget.destination); + case '/list': + return ListPage(destination: widget.destination); + case '/text': + return TextPage(destination: widget.destination); + } + }, + ); + }, + ); + } +} + +class RootPage extends StatelessWidget { + const RootPage({Key key, this.destination}) : super(key: key); + + final PageDestination destination; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text(destination.title), + backgroundColor: destination.materialColor, + ), + backgroundColor: destination.materialColor[50], + body: SizedBox.expand( + child: InkWell( + onTap: () { + Navigator.pushNamed(context, "/list"); + }, + ), + ), + ); + } +} + +class ListPage extends StatelessWidget { + const ListPage({Key key, this.destination}) : super(key: key); + + final PageDestination destination; + + @override + Widget build(BuildContext context) { + const List shades = [ + 50, + 100, + 200, + 300, + 400, + 500, + 600, + 700, + 800, + 900 + ]; + + return Scaffold( + appBar: AppBar( + title: Text(destination.title), + backgroundColor: destination.materialColor, + ), + backgroundColor: destination.materialColor[50], + body: SizedBox.expand( + child: ListView.builder( + itemCount: shades.length, + itemBuilder: (BuildContext context, int index) { + return SizedBox( + height: 128, + child: Card( + color: + destination.materialColor[shades[index]].withOpacity(0.25), + child: InkWell( + onTap: () { + Navigator.pushNamed(context, "/text"); + }, + child: Center( + child: Text('Item $index', + style: Theme.of(context).primaryTextTheme.display1), + ), + ), + ), + ); + }, + ), + ), + ); + } +} + +class TextPage extends StatefulWidget { + const TextPage({Key key, this.destination}) : super(key: key); + + final PageDestination destination; + + @override + _TextPageState createState() => _TextPageState(); +} + +class _TextPageState extends State { + TextEditingController _textController; + + @override + void initState() { + super.initState(); + _textController = TextEditingController( + text: 'sample text: ${widget.destination.title}', + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text(widget.destination.title), + backgroundColor: widget.destination.materialColor, + ), + backgroundColor: widget.destination.materialColor[50], + body: Container( + padding: const EdgeInsets.all(32.0), + alignment: Alignment.center, + child: TextField(controller: _textController), + ), + ); + } + + @override + void dispose() { + _textController.dispose(); + super.dispose(); + } +} + +//The destination information for the bottom navigation +List allDestinations = [ + PageDestination('Home', Colors.blue, CupertinoIcons.home, Icons.home, + Constants.HOME_MAIN_PAGE), + PageDestination('Appointments', Colors.blue, CupertinoIcons.book, + CupertinoIcons.book_solid, Constants.APPOINTMENTS_MAIN_PAGE), +]; diff --git a/lib/screens/home_page.dart b/lib/screens/home_page.dart index acf5188..ffc6c9d 100644 --- a/lib/screens/home_page.dart +++ b/lib/screens/home_page.dart @@ -1,46 +1,119 @@ import 'package:digamobile/auth_service.dart'; import 'package:digamobile/containers/counter/counter.dart'; import 'package:digamobile/containers/counter/increase_counter.dart'; +import 'package:digamobile/screens/fragments/chat_fragment.dart'; +import 'package:digamobile/screens/fragments/templates/destination_view.dart'; +import 'package:digamobile/styles/constants.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class HomePage extends StatelessWidget { final String title; + //Call back to pass menu click event to the app base to open the app drawer + final VoidCallback menuClicked; + final PageDestination destination; - HomePage(this.title); + HomePage( + this.title, { + this.menuClicked, + this.destination, + }); + + @override + Widget build(BuildContext context) { + return Navigator( + onGenerateRoute: (RouteSettings settings) { + return MaterialPageRoute( + settings: settings, + builder: (BuildContext context) { + switch (settings.name) { + case ConstantsRoutes.HOME_ROOT_PAGE: + return _HomeScreen( + destination: destination, + title: title, + menuClicked: () { + print("Clicked in home"); + this.menuClicked.call(); + }, + ); + case ConstantsRoutes.HOME_CHAT_PAGE: + return ChatFragment( + destination: destination, + ); + } + }, + ); + }, + ); + } +} + +class _HomeScreen extends StatelessWidget { + const _HomeScreen({ + Key key, + this.title, + this.menuClicked, + this.destination, + }) : super(key: key); + final String title; + //Call back to pass menu click event to the app base to open the app drawer + final VoidCallback menuClicked; + + final PageDestination destination; @override Widget build(BuildContext context) { return new Scaffold( - backgroundColor: Colors.grey[50], - appBar: new AppBar( - title: new Text(this.title), - backgroundColor: Colors.white, - elevation: 0.0, + backgroundColor: Colors.grey[50], + appBar: new AppBar( + centerTitle: true, + title: new Text( + this.title, + style: TextStyle(color: Colors.grey.shade800, fontSize: 14), ), - body: new Container( - child: new Center( - child: new Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text('You are logged in'), - SizedBox(height: 10.0), - RaisedButton( - onPressed: () { - AuthService().signOut(); - }, - child: Center( - child: Text('Sign Out'), - ), - color: Colors.red, - ), - new Text( - 'You have pushed the button this many times:', - ), - new Counter(), - ], + backgroundColor: Colors.white, + elevation: 0.0, + leading: IconButton( + icon: Icon( + Icons.menu, + color: Colors.grey.shade900, ), + onPressed: () { + this.menuClicked.call(); + }), + ), + body: new Container( + child: new Center( + child: new Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('You are logged in'), + SizedBox(height: 10.0), + RaisedButton( + onPressed: () { + AuthService().signOut(); + }, + child: Center( + child: Text('Sign Out'), + ), + color: Colors.red, + ), + new Text( + 'You have pushed the button this many times:', + ), + new Counter(), + ], ), ), - floatingActionButton: new IncreaseCountButton()); + ), + //floatingActionButton: new IncreaseCountButton()); + floatingActionButton: FloatingActionButton( + onPressed: () { + Navigator.of(context).pushNamed(ConstantsRoutes.HOME_CHAT_PAGE); + }, + child: Icon(Icons.chat), + ), + resizeToAvoidBottomInset: true, + ); } -} \ No newline at end of file +} diff --git a/lib/services/chatbot_service_config.dart b/lib/services/chatbot_service_config.dart new file mode 100644 index 0000000..a90cc22 --- /dev/null +++ b/lib/services/chatbot_service_config.dart @@ -0,0 +1,63 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:http/http.dart' as http; + +import 'package:dash_chat/dash_chat.dart'; + +class ChatbotServiceConfig { + ChatbotServiceConfig(this.endPointUrl) { + if (client == null) client = http.Client(); + } + //api endpoint url, should be passed into the build proccess on the final build + //for now, will be hard coded. + final endPointUrl; + http.Client client; + + ///[StreamController] Controls the stream and Sink for message api + ///Set to broadcast so the messages don't decay on first emmit + StreamController _apiStreamController = StreamController.broadcast(); + + ///[chatBotMessageStream] is a [Stream]that will be subscribed to by any listeners + ///emmits messages from this api that are passed into the internal [StreamSink] + Stream get chatBotMessageStream => _apiStreamController.stream; + + ///[_internalMessageStreamSink] is the internal [StreamSink] + ///that is used to pass data to all listeners + StreamSink get _internalMessageStreamSink => _apiStreamController.sink; + + sendMessage(ChatMessage message, + {String url: + 'https://account.snatchbot.me/channels/api/api/id94441/appcom.moozenhq.digamobile/apsF58DCEC4F87FBF5BFADE9F5D56F91'}) async { + if (message.text != null) + try { + if (client == null) client = http.Client(); + + var uriResponse = await client.post(url, body: { + 'message': '${message.text}', + 'user_id': 'nedle', + "first_name": "Heckt" + }).then((value) async { + Map botMessage; + print(value.headers); + print(value.body); + + if (value.body != null) { + botMessage = jsonDecode(value.body); + print(botMessage); + } + }); + } catch (e) { + print("@@@error decoding:$e"); + } + } + + ///must call when done to prevent memory leaks + dispose() { + _apiStreamController.close(); + _internalMessageStreamSink.close(); + + ///close the connection to the http client chatbot api + client.close(); + } +} diff --git a/lib/styles/constants.dart b/lib/styles/constants.dart new file mode 100644 index 0000000..e47e323 --- /dev/null +++ b/lib/styles/constants.dart @@ -0,0 +1,14 @@ +class Constants { + ///Main Route Pages + static const HOME_MAIN_PAGE = 0; + static const APPOINTMENTS_MAIN_PAGE = 1; +} + +///Provides const values used in routing the app from page to page +class ConstantsRoutes { + ///'/' : Reperesents the root page of the [HomePage] + static const HOME_ROOT_PAGE = "/"; + + ///'/chat' : Represents the [ChatFragment] page - from the [HomePage] base + static const HOME_CHAT_PAGE = "/chat"; +} diff --git a/pubspec.lock b/pubspec.lock index 49189c0..163c306 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -64,6 +64,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.3" + custom_navigator: + dependency: "direct main" + description: + name: custom_navigator + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.0" + dash_chat: + dependency: "direct main" + description: + name: dash_chat + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.16" firebase: dependency: transitive description: @@ -118,6 +132,27 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_inner_drawer: + dependency: "direct main" + description: + name: flutter_inner_drawer + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.4" + flutter_parsed_text: + dependency: transitive + description: + name: flutter_parsed_text + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.3" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.6" flutter_redux: dependency: "direct main" description: @@ -135,6 +170,20 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_webview_plugin: + dependency: "direct main" + description: + name: flutter_webview_plugin + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.10+1" + font_awesome_flutter: + dependency: "direct main" + description: + name: font_awesome_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "8.7.0" google_sign_in: dependency: "direct main" description: @@ -157,7 +206,7 @@ packages: source: hosted version: "0.8.3+2" http: - dependency: transitive + dependency: "direct main" description: name: http url: "https://pub.dartlang.org" @@ -177,6 +226,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.4" + image_picker: + dependency: "direct main" + description: + name: image_picker + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.3+4" + intl: + dependency: transitive + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.1" js: dependency: transitive description: @@ -184,6 +247,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.6.1+1" + line_awesome_icons: + dependency: "direct main" + description: + name: line_awesome_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4+2" logging: dependency: transitive description: @@ -300,7 +370,14 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.11" + version: "0.2.14" + transparent_image: + dependency: transitive + description: + name: transparent_image + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" typed_data: dependency: transitive description: @@ -308,6 +385,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.6" + uuid: + dependency: transitive + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a1740c5..50ffb6e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,7 +14,7 @@ description: A new Flutter project. version: 1.0.0+1 environment: - sdk: ">=2.1.0 <3.0.0" + sdk: ">=2.6.0 <3.0.0" dependencies: flutter: @@ -24,9 +24,17 @@ dependencies: redux_logging: ^0.4.0 firebase_auth: 0.15.3 google_sign_in: ^4.1.1 + dash_chat: ^1.0.16 + custom_navigator: ^0.3.0 + flutter_inner_drawer: ^0.5.4 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 + font_awesome_flutter: ^8.5.0 + line_awesome_icons: ^1.0.4+2 + image_picker: ^0.6.3+4 + http: ^0.12.0+4 + flutter_webview_plugin: ^0.3.10+1 dependency_overrides: firebase_core: 0.4.4 @@ -34,30 +42,24 @@ dependency_overrides: dev_dependencies: flutter_test: sdk: flutter - # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter. flutter: - # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true - # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg - # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. - # For details regarding adding assets from package dependencies, see # https://flutter.dev/assets-and-images/#from-packages - # To add custom fonts to your application, add a fonts section here, # in this "flutter" section. Each entry in this list should have a # "family" key with the font family name, and a "fonts" key with a