From 89b96f600bdcdb87864a0d3c5ed9241a4a4ebe7f Mon Sep 17 00:00:00 2001 From: Specoolazius Date: Mon, 18 Oct 2021 14:07:03 +0200 Subject: [PATCH] save --- lib/{ => chat}/chat_buttons.dart | 0 lib/login/login.dart | 131 +++++++++++++++++++++++++++++++ lib/login/loginscreen.dart | 25 ++++++ lib/main.dart | 8 +- lib/settings/settings.dart | 12 +++ lib/theme/constants.dart | 0 needConectionMethods.txt | 16 ++++ pubspec.lock | 43 ++++++++++ pubspec.yaml | 1 + 9 files changed, 235 insertions(+), 1 deletion(-) rename lib/{ => chat}/chat_buttons.dart (100%) create mode 100644 lib/login/login.dart create mode 100644 lib/login/loginscreen.dart create mode 100644 lib/settings/settings.dart create mode 100644 lib/theme/constants.dart create mode 100644 needConectionMethods.txt diff --git a/lib/chat_buttons.dart b/lib/chat/chat_buttons.dart similarity index 100% rename from lib/chat_buttons.dart rename to lib/chat/chat_buttons.dart diff --git a/lib/login/login.dart b/lib/login/login.dart new file mode 100644 index 0000000..d12f4dc --- /dev/null +++ b/lib/login/login.dart @@ -0,0 +1,131 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +void main() => runApp(const Noise()); + +// ToDo: remove when done: currently only for testing purposes +class Noise extends StatelessWidget { + const Noise({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: LoginPage(), + ); + } +} + +class LoginPage extends StatefulWidget { + const LoginPage({Key? key}) : super(key: key); + + @override + _LoginPageState createState() => _LoginPageState(); +} + +class _LoginPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + body: AnnotatedRegion( + value: SystemUiOverlayStyle.light, + child: GestureDetector( + child: Stack( + children: [ + Container( + height: double.infinity, + width: double.infinity, + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + Color(0x665ac18e), + Color(0x995ac18e), + Color(0xcc5ac18e), + Color(0xff5ac18e), + ])), + child: SingleChildScrollView( + padding: EdgeInsets.symmetric( + horizontal: 25, + vertical: 120 + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'sign In', + style: TextStyle( + color: Colors.white, + fontSize: 40, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 50), + buildEmail() + ], + ), + ), + ) + ], + )), + ), + ); + } + + Widget buildPassword() { + return Column( + + ); + } + + + Widget buildEmail() { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Email', + style: TextStyle( + color: Colors.white, + fontSize: 16, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 10), + Container( + alignment: Alignment.centerLeft, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + boxShadow: [ + BoxShadow( + color: Colors.black26, + blurRadius: 6, + offset: Offset(0, 2), + ) + ] + ), + height: 60, + child: TextField( + keyboardType: TextInputType.emailAddress, + style: TextStyle( + color: Colors.black87, + ), + decoration: InputDecoration( + border: InputBorder.none, + contentPadding: EdgeInsets.only(top: 14), + prefixIcon: Icon( + Icons.email, + color: Color(0xff5ac18e), + ), + hintText: 'Email', + hintStyle: TextStyle( + color: Colors.black38, + ) + ), + ), + ) + ], + ); + } +} diff --git a/lib/login/loginscreen.dart b/lib/login/loginscreen.dart new file mode 100644 index 0000000..30d57f5 --- /dev/null +++ b/lib/login/loginscreen.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_noise/main.dart'; + +void main() => runApp(const LoginPage()); + +// ToDo: remove when done: currently only for testing purposes +class LoginPage extends StatefulWidget { + const LoginPage({Key? key}) : super(key: key); + + @override + _LoginPageState createState() => _LoginPageState(); +} + +class _LoginPageState extends State { + bool _isPasswordObscure = true; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: const Text('Welcome')), + body: Center( + + )); + } +} diff --git a/lib/main.dart b/lib/main.dart index d0462db..8057692 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,12 +1,18 @@ import 'package:flutter/material.dart'; +import './login/login.dart'; void main() => runApp(const Noise()); +class + + class Noise extends StatelessWidget { const Noise({Key? key}) : super(key: key); + bool _isOPasswordObscure = true; + @override Widget build(BuildContext context) { - return Container(); + return MaterialApp(); } } diff --git a/lib/settings/settings.dart b/lib/settings/settings.dart new file mode 100644 index 0000000..007c301 --- /dev/null +++ b/lib/settings/settings.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + + +class SettingsPage extends StatelessWidget { + + @override + Widget build(BuildContext context) { + // TODO: implement build + return + throw UnimplementedError(); + } +} diff --git a/lib/theme/constants.dart b/lib/theme/constants.dart new file mode 100644 index 0000000..e69de29 diff --git a/needConectionMethods.txt b/needConectionMethods.txt new file mode 100644 index 0000000..8f99143 --- /dev/null +++ b/needConectionMethods.txt @@ -0,0 +1,16 @@ + +!Needed methods:! + +Dart -> Kotlin + + +Kotlin -> Dart + +// Dart reloads users picture from ./cache (??) when it changes on runtime +- did_profilepicture_change() -> bool + +// new messages +// look for currently open chat (if none is open -> null). +-> update_text() +# ToDo!! Does Kotlin or Dart send notifications? + diff --git a/pubspec.lock b/pubspec.lock index 381951a..2d032f4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -43,6 +43,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" cupertino_icons: dependency: "direct main" description: @@ -62,6 +69,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.4" flutter_test: dependency: "direct dev" description: flutter @@ -88,6 +102,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.1+1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" sky_engine: dependency: transitive description: flutter @@ -149,5 +184,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "3.7.0" sdks: dart: ">=2.12.0 <3.0.0" + flutter: ">=1.6.7" diff --git a/pubspec.yaml b/pubspec.yaml index 4f82646..9c6f71c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,6 +28,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 + flutter_svg: ^0.17.4 dev_dependencies: flutter_test: