diff --git a/README.md b/README.md index 3b1e054..b797828 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ # Imagini +## Running Server + +## Server Build + +## Flutter Build + flutter run diff --git a/web_native/ios/Podfile.lock b/web_native/ios/Podfile.lock index e52522f..75666d7 100644 --- a/web_native/ios/Podfile.lock +++ b/web_native/ios/Podfile.lock @@ -1,21 +1,80 @@ PODS: + - DKImagePickerController/Core (4.3.2): + - DKImagePickerController/ImageDataManager + - DKImagePickerController/Resource + - DKImagePickerController/ImageDataManager (4.3.2) + - DKImagePickerController/PhotoGallery (4.3.2): + - DKImagePickerController/Core + - DKPhotoGallery + - DKImagePickerController/Resource (4.3.2) + - DKPhotoGallery (0.0.17): + - DKPhotoGallery/Core (= 0.0.17) + - DKPhotoGallery/Model (= 0.0.17) + - DKPhotoGallery/Preview (= 0.0.17) + - DKPhotoGallery/Resource (= 0.0.17) + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Core (0.0.17): + - DKPhotoGallery/Model + - DKPhotoGallery/Preview + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Model (0.0.17): + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Preview (0.0.17): + - DKPhotoGallery/Model + - DKPhotoGallery/Resource + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Resource (0.0.17): + - SDWebImage + - SwiftyGif + - file_picker (0.0.1): + - DKImagePickerController/PhotoGallery + - Flutter - Flutter (1.0.0) - integration_test (0.0.1): - Flutter + - SDWebImage (5.10.2): + - SDWebImage/Core (= 5.10.2) + - SDWebImage/Core (5.10.2) + - SwiftyGif (5.3.0) + - url_launcher (0.0.1): + - Flutter DEPENDENCIES: + - file_picker (from `.symlinks/plugins/file_picker/ios`) - Flutter (from `Flutter`) - integration_test (from `.symlinks/plugins/integration_test/ios`) + - url_launcher (from `.symlinks/plugins/url_launcher/ios`) + +SPEC REPOS: + trunk: + - DKImagePickerController + - DKPhotoGallery + - SDWebImage + - SwiftyGif EXTERNAL SOURCES: + file_picker: + :path: ".symlinks/plugins/file_picker/ios" Flutter: :path: Flutter integration_test: :path: ".symlinks/plugins/integration_test/ios" + url_launcher: + :path: ".symlinks/plugins/url_launcher/ios" SPEC CHECKSUMS: + DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d + DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 + file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1 Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c integration_test: 5ed24a436eb7ec17b6a13046e9bf7ca4a404e59e + SDWebImage: b969dcfc02c40a5da71eac0b03b8f1a0c794a86f + SwiftyGif: e466e86c660d343357ab944a819a101c4127cb40 + url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c diff --git a/web_native/lib/routes.dart b/web_native/lib/routes.dart index 2bf44bb..3a81cd7 100644 --- a/web_native/lib/routes.dart +++ b/web_native/lib/routes.dart @@ -1,10 +1,16 @@ import 'package:flutter/widgets.dart'; -import 'package:imagini/screens/photo/photoscreen.dart'; +import 'package:imagini/screens/splash/splashscreen.dart'; +import 'package:imagini/screens/me/mescreen.dart'; +import 'package:imagini/screens/login/loginscreen.dart'; import 'package:imagini/screens/upload/uploadscreen.dart'; -import 'package:imagini/screens/example2/examplescreen2.dart'; +import 'package:imagini/screens/gallery/galleryscreen.dart'; +import 'package:imagini/screens/settings/settingsscreen.dart'; final Map routes = { - "/": (BuildContext context) => PhotoScreen(), - "/Upload": (BuildContext context) => UploadScreen(), - "/ExScreen2": (BuildContext context) => ExScreen2(), + "/": (BuildContext context) => SplashScreen(), + "/Me": (BuildContext context) => MeScreen(), + "/Login": (BuildContext context) => LoginScreen(), + "/Upload": (BuildContext context) => UploadScreen(), + "/Gallery": (BuildContext context) => GalleryScreen(), + "/Settings": (BuildContext context) => SettingsScreen(), }; diff --git a/web_native/lib/screens/example2/examplescreen2.dart b/web_native/lib/screens/example2/examplescreen2.dart deleted file mode 100644 index fafe7dd..0000000 --- a/web_native/lib/screens/example2/examplescreen2.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:imagini/screens/example2/components/body.dart'; -import 'package:imagini/screens/example2/example2-bloc.dart'; -import 'package:imagini/bloc/bloc-prov.dart'; - -class ExScreen2 extends StatefulWidget { - @override - _ExScreen2State createState() => _ExScreen2State(); -} - -class _ExScreen2State extends State { - Example2Bloc example2Bloc; - - @override - void initState() { - super.initState(); - - example2Bloc = Example2Bloc(); - } - - @override - void dispose() { - example2Bloc.dispose(); - - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return BlocProvider( - bloc: Example2Bloc(), - child: Scaffold( - appBar: AppBar( - title: Text("Second Screen"), - ), - body: Body(), - ), - ); - } -} diff --git a/web_native/lib/screens/photo/components/body.dart b/web_native/lib/screens/gallery/components/body.dart similarity index 100% rename from web_native/lib/screens/photo/components/body.dart rename to web_native/lib/screens/gallery/components/body.dart diff --git a/web_native/lib/screens/example2/example2-bloc.dart b/web_native/lib/screens/gallery/gallery-bloc.dart similarity index 90% rename from web_native/lib/screens/example2/example2-bloc.dart rename to web_native/lib/screens/gallery/gallery-bloc.dart index a20c51f..76a8ee0 100644 --- a/web_native/lib/screens/example2/example2-bloc.dart +++ b/web_native/lib/screens/gallery/gallery-bloc.dart @@ -5,14 +5,14 @@ import 'package:imagini/models/contact.dart'; import 'package:flutter/material.dart'; import 'package:imagini/bloc/bloc.dart'; -class Example2Bloc extends Bloc { +class GalleryBloc extends Bloc { StreamSubscription _audioPlayerStateSubscription; Stream get example => _exampleSubject.stream; Sink get exampleSink => _exampleSubject.sink; final StreamController _exampleSubject = StreamController(); - Example2Bloc(); + GalleryBloc(); void dispose() { _exampleSubject.close(); diff --git a/web_native/lib/screens/gallery/galleryscreen.dart b/web_native/lib/screens/gallery/galleryscreen.dart new file mode 100644 index 0000000..ddba72d --- /dev/null +++ b/web_native/lib/screens/gallery/galleryscreen.dart @@ -0,0 +1,45 @@ +import 'package:flutter/material.dart'; +import 'package:imagini/screens/gallery/components/body.dart'; +import 'package:imagini/screens/gallery/gallery-bloc.dart'; +import 'package:imagini/bloc/bloc-prov.dart'; +import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; + + +class GalleryScreen extends StatefulWidget { + @override + _GalleryScreenState createState() => _GalleryScreenState(); +} + +class _GalleryScreenState extends State { + GalleryBloc exampleBloc; + + @override + void initState() { + super.initState(); + exampleBloc = GalleryBloc(); + } + + @override + void dispose() { + exampleBloc.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BlocProvider( + bloc: exampleBloc, + child: PlatformScaffold( + appBar: PlatformAppBar( + title: Text('Gallerys'), + cupertino: (_, __) => CupertinoNavigationBarData( + // Issue with cupertino where a bar with no transparency + // will push the list down. Adding some alpha value fixes it (in a hacky way) + backgroundColor: Colors.lightGreen.withAlpha(254), + ), + ), + body: Body(), + ), + ); + } +} diff --git a/web_native/lib/screens/login/components/body.dart b/web_native/lib/screens/login/components/body.dart index 5f8ca91..f293e15 100644 --- a/web_native/lib/screens/login/components/body.dart +++ b/web_native/lib/screens/login/components/body.dart @@ -6,10 +6,11 @@ class Body extends StatelessWidget { return Center( child: RaisedButton( onPressed: () { - Navigator.pop(context); + // Go to Login Screen + Navigator.pushNamed(context, '/Gallery'); }, - child: Text('Go back!'), + child: Text('Login'), ), ); } -} \ No newline at end of file +} diff --git a/web_native/lib/screens/login/login-bloc.dart b/web_native/lib/screens/login/login-bloc.dart index a20c51f..0abd766 100644 --- a/web_native/lib/screens/login/login-bloc.dart +++ b/web_native/lib/screens/login/login-bloc.dart @@ -5,14 +5,14 @@ import 'package:imagini/models/contact.dart'; import 'package:flutter/material.dart'; import 'package:imagini/bloc/bloc.dart'; -class Example2Bloc extends Bloc { +class LoginBloc extends Bloc { StreamSubscription _audioPlayerStateSubscription; Stream get example => _exampleSubject.stream; Sink get exampleSink => _exampleSubject.sink; final StreamController _exampleSubject = StreamController(); - Example2Bloc(); + LoginBloc(); void dispose() { _exampleSubject.close(); diff --git a/web_native/lib/screens/login/loginscreen.dart b/web_native/lib/screens/login/loginscreen.dart index fafe7dd..e68d96a 100644 --- a/web_native/lib/screens/login/loginscreen.dart +++ b/web_native/lib/screens/login/loginscreen.dart @@ -1,37 +1,35 @@ import 'package:flutter/material.dart'; -import 'package:imagini/screens/example2/components/body.dart'; -import 'package:imagini/screens/example2/example2-bloc.dart'; +import 'package:imagini/screens/login/components/body.dart'; +import 'package:imagini/screens/login/login-bloc.dart'; import 'package:imagini/bloc/bloc-prov.dart'; -class ExScreen2 extends StatefulWidget { +class LoginScreen extends StatefulWidget { @override - _ExScreen2State createState() => _ExScreen2State(); + _LoginScreenState createState() => _LoginScreenState(); } -class _ExScreen2State extends State { - Example2Bloc example2Bloc; +class _LoginScreenState extends State { + LoginBloc loginBloc; @override void initState() { super.initState(); - - example2Bloc = Example2Bloc(); + loginBloc = LoginBloc(); } @override void dispose() { - example2Bloc.dispose(); - + loginBloc.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return BlocProvider( - bloc: Example2Bloc(), + bloc: LoginBloc(), child: Scaffold( appBar: AppBar( - title: Text("Second Screen"), + title: Text("Login"), ), body: Body(), ), diff --git a/web_native/lib/screens/example2/components/body.dart b/web_native/lib/screens/me/components/body.dart similarity index 72% rename from web_native/lib/screens/example2/components/body.dart rename to web_native/lib/screens/me/components/body.dart index 5f8ca91..51d2aed 100644 --- a/web_native/lib/screens/example2/components/body.dart +++ b/web_native/lib/screens/me/components/body.dart @@ -6,10 +6,10 @@ class Body extends StatelessWidget { return Center( child: RaisedButton( onPressed: () { - Navigator.pop(context); + Navigator.pushNamed(context, '/Upload'); }, - child: Text('Go back!'), + child: Text('Page Two!'), ), ); } -} \ No newline at end of file +} diff --git a/web_native/lib/screens/photo/photo-bloc.dart b/web_native/lib/screens/me/me-bloc.dart similarity index 91% rename from web_native/lib/screens/photo/photo-bloc.dart rename to web_native/lib/screens/me/me-bloc.dart index f9e41cb..20e3afa 100644 --- a/web_native/lib/screens/photo/photo-bloc.dart +++ b/web_native/lib/screens/me/me-bloc.dart @@ -5,14 +5,14 @@ import 'package:imagini/models/contact.dart'; import 'package:flutter/material.dart'; import 'package:imagini/bloc/bloc.dart'; -class PhotoBloc extends Bloc { +class MeBloc extends Bloc { StreamSubscription _audioPlayerStateSubscription; Stream get example => _exampleSubject.stream; Sink get exampleSink => _exampleSubject.sink; final StreamController _exampleSubject = StreamController(); - PhotoBloc(); + MeBloc(); void dispose() { _exampleSubject.close(); diff --git a/web_native/lib/screens/photo/photoscreen.dart b/web_native/lib/screens/me/mescreen.dart similarity index 69% rename from web_native/lib/screens/photo/photoscreen.dart rename to web_native/lib/screens/me/mescreen.dart index 234f992..63dd476 100644 --- a/web_native/lib/screens/photo/photoscreen.dart +++ b/web_native/lib/screens/me/mescreen.dart @@ -1,22 +1,22 @@ import 'package:flutter/material.dart'; -import 'package:imagini/screens/photo/components/body.dart'; -import 'package:imagini/screens/photo/photo-bloc.dart'; +import 'package:imagini/screens/me/components/body.dart'; +import 'package:imagini/screens/me/me-bloc.dart'; import 'package:imagini/bloc/bloc-prov.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; -class PhotoScreen extends StatefulWidget { +class MeScreen extends StatefulWidget { @override - _PhotoScreenState createState() => _PhotoScreenState(); + _MeScreenState createState() => _MeScreenState(); } -class _PhotoScreenState extends State { - PhotoBloc exampleBloc; +class _MeScreenState extends State { + MeBloc exampleBloc; @override void initState() { super.initState(); - exampleBloc = PhotoBloc(); + exampleBloc = MeBloc(); } @override @@ -31,7 +31,7 @@ class _PhotoScreenState extends State { bloc: exampleBloc, child: PlatformScaffold( appBar: PlatformAppBar( - title: Text('Photos'), + title: Text('Mes'), cupertino: (_, __) => CupertinoNavigationBarData( // Issue with cupertino where a bar with no transparency // will push the list down. Adding some alpha value fixes it (in a hacky way) diff --git a/web_native/lib/screens/settings/components/body.dart b/web_native/lib/screens/settings/components/body.dart new file mode 100644 index 0000000..51d2aed --- /dev/null +++ b/web_native/lib/screens/settings/components/body.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class Body extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Center( + child: RaisedButton( + onPressed: () { + Navigator.pushNamed(context, '/Upload'); + }, + child: Text('Page Two!'), + ), + ); + } +} diff --git a/web_native/lib/screens/settings/settings-bloc.dart b/web_native/lib/screens/settings/settings-bloc.dart new file mode 100644 index 0000000..f3a9bc2 --- /dev/null +++ b/web_native/lib/screens/settings/settings-bloc.dart @@ -0,0 +1,20 @@ +import 'dart:async'; +import 'dart:ui'; +import 'package:flutter/services.dart'; +import 'package:imagini/models/contact.dart'; +import 'package:flutter/material.dart'; +import 'package:imagini/bloc/bloc.dart'; + +class SettingsBloc extends Bloc { + StreamSubscription _audioPlayerStateSubscription; + + Stream get example => _exampleSubject.stream; + Sink get exampleSink => _exampleSubject.sink; + final StreamController _exampleSubject = StreamController(); + + SettingsBloc(); + + void dispose() { + _exampleSubject.close(); + } +} diff --git a/web_native/lib/screens/settings/settingsscreen.dart b/web_native/lib/screens/settings/settingsscreen.dart new file mode 100644 index 0000000..ba6c4b7 --- /dev/null +++ b/web_native/lib/screens/settings/settingsscreen.dart @@ -0,0 +1,45 @@ +import 'package:flutter/material.dart'; +import 'package:imagini/screens/settings/components/body.dart'; +import 'package:imagini/screens/settings/settings-bloc.dart'; +import 'package:imagini/bloc/bloc-prov.dart'; +import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; + + +class SettingsScreen extends StatefulWidget { + @override + _SettingsScreenState createState() => _SettingsScreenState(); +} + +class _SettingsScreenState extends State { + SettingsBloc exampleBloc; + + @override + void initState() { + super.initState(); + exampleBloc = SettingsBloc(); + } + + @override + void dispose() { + exampleBloc.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BlocProvider( + bloc: exampleBloc, + child: PlatformScaffold( + appBar: PlatformAppBar( + title: Text('Settings'), + cupertino: (_, __) => CupertinoNavigationBarData( + // Issue with cupertino where a bar with no transparency + // will push the list down. Adding some alpha value fixes it (in a hacky way) + backgroundColor: Colors.lightGreen.withAlpha(254), + ), + ), + body: Body(), + ), + ); + } +} diff --git a/web_native/lib/screens/splash/components/body.dart b/web_native/lib/screens/splash/components/body.dart new file mode 100644 index 0000000..8f45789 --- /dev/null +++ b/web_native/lib/screens/splash/components/body.dart @@ -0,0 +1,19 @@ +import 'package:flutter/material.dart'; + +class Body extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Center( + child: RaisedButton( + onPressed: () { + // Back (popping) + // Navigator.pop(context); + + // Go to Login Screen + Navigator.pushNamed(context, '/Login'); + }, + child: Text('Login'), + ), + ); + } +} diff --git a/web_native/lib/screens/splash/splash-bloc.dart b/web_native/lib/screens/splash/splash-bloc.dart new file mode 100644 index 0000000..2d06753 --- /dev/null +++ b/web_native/lib/screens/splash/splash-bloc.dart @@ -0,0 +1,20 @@ +import 'dart:async'; +import 'dart:ui'; +import 'package:flutter/services.dart'; +import 'package:imagini/models/contact.dart'; +import 'package:flutter/material.dart'; +import 'package:imagini/bloc/bloc.dart'; + +class SplashBloc extends Bloc { + StreamSubscription _audioPlayerStateSubscription; + + Stream get example => _exampleSubject.stream; + Sink get exampleSink => _exampleSubject.sink; + final StreamController _exampleSubject = StreamController(); + + SplashBloc(); + + void dispose() { + _exampleSubject.close(); + } +} diff --git a/web_native/lib/screens/splash/splashscreen.dart b/web_native/lib/screens/splash/splashscreen.dart new file mode 100644 index 0000000..9f4aba9 --- /dev/null +++ b/web_native/lib/screens/splash/splashscreen.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; +import 'package:imagini/screens/splash/components/body.dart'; +import 'package:imagini/screens/splash/splash-bloc.dart'; +import 'package:imagini/bloc/bloc-prov.dart'; + +class SplashScreen extends StatefulWidget { + @override + _SplashScreenState createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + SplashBloc splashBloc; + + @override + void initState() { + super.initState(); + splashBloc = SplashBloc(); + } + + @override + void dispose() { + splashBloc.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BlocProvider( + bloc: SplashBloc(), + child: Scaffold( + appBar: AppBar( + title: Text("First Screen"), + ), + body: Body(), + ), + ); + } +}