Basic Mobile App Framework
This commit is contained in:
parent
997806b7f0
commit
28649bda73
@ -1,2 +1,8 @@
|
||||
# Imagini
|
||||
|
||||
## Running Server
|
||||
|
||||
## Server Build
|
||||
|
||||
## Flutter Build
|
||||
flutter run
|
||||
|
@ -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
|
||||
|
||||
|
@ -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<String, WidgetBuilder> routes = <String, WidgetBuilder>{
|
||||
"/": (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(),
|
||||
};
|
||||
|
@ -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<ExScreen2> {
|
||||
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(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -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<String> get example => _exampleSubject.stream;
|
||||
Sink<String> get exampleSink => _exampleSubject.sink;
|
||||
final StreamController<String> _exampleSubject = StreamController<String>();
|
||||
|
||||
Example2Bloc();
|
||||
GalleryBloc();
|
||||
|
||||
void dispose() {
|
||||
_exampleSubject.close();
|
45
web_native/lib/screens/gallery/galleryscreen.dart
Normal file
45
web_native/lib/screens/gallery/galleryscreen.dart
Normal file
@ -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<GalleryScreen> {
|
||||
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(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -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'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<String> get example => _exampleSubject.stream;
|
||||
Sink<String> get exampleSink => _exampleSubject.sink;
|
||||
final StreamController<String> _exampleSubject = StreamController<String>();
|
||||
|
||||
Example2Bloc();
|
||||
LoginBloc();
|
||||
|
||||
void dispose() {
|
||||
_exampleSubject.close();
|
||||
|
@ -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<ExScreen2> {
|
||||
Example2Bloc example2Bloc;
|
||||
class _LoginScreenState extends State<LoginScreen> {
|
||||
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(),
|
||||
),
|
||||
|
@ -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!'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
@ -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<String> get example => _exampleSubject.stream;
|
||||
Sink<String> get exampleSink => _exampleSubject.sink;
|
||||
final StreamController<String> _exampleSubject = StreamController<String>();
|
||||
|
||||
PhotoBloc();
|
||||
MeBloc();
|
||||
|
||||
void dispose() {
|
||||
_exampleSubject.close();
|
@ -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<PhotoScreen> {
|
||||
PhotoBloc exampleBloc;
|
||||
class _MeScreenState extends State<MeScreen> {
|
||||
MeBloc exampleBloc;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
exampleBloc = PhotoBloc();
|
||||
exampleBloc = MeBloc();
|
||||
}
|
||||
|
||||
@override
|
||||
@ -31,7 +31,7 @@ class _PhotoScreenState extends State<PhotoScreen> {
|
||||
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)
|
15
web_native/lib/screens/settings/components/body.dart
Normal file
15
web_native/lib/screens/settings/components/body.dart
Normal file
@ -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!'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
20
web_native/lib/screens/settings/settings-bloc.dart
Normal file
20
web_native/lib/screens/settings/settings-bloc.dart
Normal file
@ -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<String> get example => _exampleSubject.stream;
|
||||
Sink<String> get exampleSink => _exampleSubject.sink;
|
||||
final StreamController<String> _exampleSubject = StreamController<String>();
|
||||
|
||||
SettingsBloc();
|
||||
|
||||
void dispose() {
|
||||
_exampleSubject.close();
|
||||
}
|
||||
}
|
45
web_native/lib/screens/settings/settingsscreen.dart
Normal file
45
web_native/lib/screens/settings/settingsscreen.dart
Normal file
@ -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<SettingsScreen> {
|
||||
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(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
19
web_native/lib/screens/splash/components/body.dart
Normal file
19
web_native/lib/screens/splash/components/body.dart
Normal file
@ -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'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
20
web_native/lib/screens/splash/splash-bloc.dart
Normal file
20
web_native/lib/screens/splash/splash-bloc.dart
Normal file
@ -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<String> get example => _exampleSubject.stream;
|
||||
Sink<String> get exampleSink => _exampleSubject.sink;
|
||||
final StreamController<String> _exampleSubject = StreamController<String>();
|
||||
|
||||
SplashBloc();
|
||||
|
||||
void dispose() {
|
||||
_exampleSubject.close();
|
||||
}
|
||||
}
|
38
web_native/lib/screens/splash/splashscreen.dart
Normal file
38
web_native/lib/screens/splash/splashscreen.dart
Normal file
@ -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<SplashScreen> {
|
||||
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(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user