Skip to content

Commit

Permalink
Merge pull request #32 from moesaid/stage
Browse files Browse the repository at this point in the history
Stage
  • Loading branch information
moesaid authored Aug 18, 2024
2 parents 221740b + 158e6fb commit d3b33f3
Show file tree
Hide file tree
Showing 108 changed files with 1,052 additions and 921 deletions.
3 changes: 3 additions & 0 deletions .example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
supabaseURL=foo
supabaseAnonKey=bar
sentryDNS=$FOO$BAR
8 changes: 8 additions & 0 deletions .github/workflows/macos_ci_cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jobs:
steps:
- uses: actions/[email protected]

- name: create .env file
run: |
touch .env
echo supabaseURL=${{ secrets.SUBAPASE_URL }} >> .env
echo supabaseKey=${{ secrets.SUBAPASE_ANON_KEY }} >> .env
echo sentryDSN=${{ secrets.SENTRY_DNS }} >> .env
cat .env
- name: read yaml
id: read_action_js
uses: pietrobolcato/[email protected]
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/windows_ci_cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jobs:
steps:
- uses: actions/[email protected]

- name: create .env file
run: |
touch .env
echo supabaseURL=${{ secrets.SUBAPASE_URL }} >> .env
echo supabaseKey=${{ secrets.SUBAPASE_ANON_KEY }} >> .env
echo sentryDSN=${{ secrets.SENTRY_DNS }} >> .env
cat .env
- name: read yaml
id: read_action_js
uses: pietrobolcato/[email protected]
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ app.*.map.json


# custom files
Packages
Packages

# env
.env
37 changes: 27 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,34 @@
# flutterpp
![preview](https://github.com/moesaid/flutterpp/blob/stage/marketing/poster.png)

A new Flutter project.
<p align="center">
<a href="preview.md"><img src="https://github.com/moesaid/flutterpp/blob/stage/marketing/pre.png" width="32%" /></a>
&nbsp;
<a href="https://github.com/moesaid/flutterpp/releases"><img src="https://github.com/moesaid/flutterpp/blob/stage/marketing/down-mac.png" width="32%" /></a>
&nbsp;
<a href="https://github.com/moesaid/flutterpp/releases"><img src="https://github.com/moesaid/flutterpp/blob/stage/marketing/down-mac.png" width="32%" /></a>
</p>

# FlutterPP [Quick Video Demo](https://youtu.be/j8yr95t9LIM)

Welcome to FlutterPP, your developer companion for building Flutter apps with ease.

## Overview

FlutterPP (Flutter Plus Plus) is a low-code tool designed to significantly reduce development time by automating code generation for Flutter applications. This initial release, marks the beginning of an exciting journey towards making Flutter development more efficient and accessible.

## Features

- **Code Generation:** Automatically generate.
- **User-Friendly Interface:** Intuitive design for developers of all levels.

## Getting Started

This project is a starting point for a Flutter application.
To start using FlutterPP, follow these simple steps:

A few resources to get you started if this is your first Flutter project:
1. download your executable!
2. create an account.
3. enjoy fluttering!.

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
## Feedback and Contribution

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
# flutterpp
We value your feedback! If you encounter any issues or have suggestions for improvement, please [open an issue](https://github.com/moesaid/flutterpp/issues) or [start a discussion](https://github.com/moesaid/flutterpp/discussions)
29 changes: 29 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Security Policy

## Reporting a Security Vulnerability

At FlutterPP, we take security seriously. If you discover any security issues or vulnerabilities, we appreciate your responsible disclosure. Please follow the steps below to report a security vulnerability:

1. **Do not create a public GitHub issue.** Security vulnerabilities should be reported privately.
2. Email us at [[email protected]](mailto:[email protected]) with a detailed description of the vulnerability.
3. Allow us a reasonable time to address and respond to the issue before disclosing it publicly.

## Supported Versions

FlutterPP is a continually evolving project, and we strive to maintain security in the latest versions. We encourage users to keep their installations up to date with the latest releases.

## Security Measures

While we take measures to ensure the security of FlutterPP, users are encouraged to follow these best practices:

- Regularly update FlutterPP to the latest version.
- Use secure coding practices when customizing or extending the tool.
- Monitor and adhere to security recommendations provided in the documentation.

## Security Policy Changes

We may update this Security Policy as the project evolves or as security practices change. Changes will be reflected on this page.

## Contact Us

If you have any questions or concerns regarding the security of FlutterPP, please contact us at [[email protected]](mailto:[email protected]).
3 changes: 2 additions & 1 deletion lib/App/Controllers/Auth/login_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import 'package:supabase_flutter/supabase_flutter.dart';
class LoginController extends GetxController {
final supabase = Supabase.instance.client;

Future<void> login(Map<String, dynamic> value) async {
Future<void> login(Map<String, dynamic>? value) async {
if (value == null) return;
bool? isSend = await Get.showOverlay(
asyncFunction: () async {
return await AuthServices().signInWithOtp(email: value['email']);
Expand Down
17 changes: 11 additions & 6 deletions lib/App/Controllers/Auth/signup_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import 'package:supabase_flutter/supabase_flutter.dart';

class SignupController extends GetxController {
// signup
Future<void> signup(Map<String, dynamic> value) async {
Future<void> signup(Map<String, dynamic>? value) async {
if (value == null) return;

AuthResponse? res = await Get.showOverlay(
asyncFunction: () async {
return await AuthServices().signUp(
Expand All @@ -19,7 +21,7 @@ class SignupController extends GetxController {
loadingWidget: const BuildOverlay(),
);

if (res == null || res.user?.id == null) {
if (res == null || res.user == null || res.user?.id == null) {
BuildSnackBar(
title: 'Error',
message: 'Something went wrong while signing up , please try again',
Expand All @@ -28,9 +30,12 @@ class SignupController extends GetxController {
return;
}

Get.toNamed(AppRoutes.VERIFY_OTP, arguments: {
'email': value['email'],
'otpType': OtpType.signup,
});
Get.toNamed(
AppRoutes.VERIFY_OTP,
arguments: {
'email': value['email'],
'otpType': OtpType.signup,
},
);
}
}
4 changes: 3 additions & 1 deletion lib/App/Controllers/Auth/verify_otp_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class VerifyOtpController extends GetxController {
super.onInit();
}

Future<void> verifyOtp(Map<String, dynamic> value) async {
Future<void> verifyOtp(Map<String, dynamic>? value) async {
if (value == null) return;

try {
AuthResponse? res = await Get.showOverlay(
asyncFunction: () async {
Expand Down
4 changes: 2 additions & 2 deletions lib/App/Views/Global/build_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ class BuildLayout extends StatelessWidget {
],
),
Positioned(
bottom: 10.sp,
left: 10.sp,
bottom: 10.spa,
left: 10.spa,
child: const BuildAppUpdateWidget(),
),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/App/Views/Global/build_page_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class BuildPageLayout extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: padding ?? EdgeInsets.all(8.sp),
padding: padding ?? EdgeInsets.all(8.spa),
child: child,
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/App/Views/Global/build_preeset_gradient_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class BuildPresetGradientList
// child: Text(
// item.name?.limitLength(10) ?? 'No Name',
// style: Get.textTheme.bodyMedium
// ?.copyWith(fontSize: 5.sp),
// ?.copyWith(fontSize: 5.spa),
// ),
// ),
],
Expand Down
12 changes: 6 additions & 6 deletions lib/App/Views/Global/build_search_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class BuildSearchForm extends StatelessWidget {
width: context.width * 0.2,
clipBehavior: Clip.antiAlias,
padding: EdgeInsets.symmetric(
horizontal: 4.sp,
vertical: 2.sp,
horizontal: 4.spa,
vertical: 2.spa,
),
decoration: BoxDecoration(
color: Get.theme.colorScheme.primaryContainer,
Expand All @@ -44,7 +44,7 @@ class BuildSearchForm extends StatelessWidget {
hintText: 'Search',
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(
vertical: 2.sp,
vertical: 2.spa,
horizontal: 0,
),
isDense: true,
Expand All @@ -59,12 +59,12 @@ class BuildSearchForm extends StatelessWidget {
),
),
hintStyle: Get.textTheme.bodyMedium?.copyWith(
color: Get.theme.colorScheme.onBackground.withOpacity(0.4),
color: Get.theme.colorScheme.onSurface.withOpacity(0.4),
),
),
),
),
SizedBox(width: 2.sp),
SizedBox(width: 2.spa),
InkWell(
onTap: () {
if (searchKey != null && searchKey!.isNotEmpty) {
Expand All @@ -80,7 +80,7 @@ class BuildSearchForm extends StatelessWidget {
(searchKey != null && searchKey!.isNotEmpty)
? Icons.close
: Icons.search_rounded,
size: 6.sp,
size: 6.spa,
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/App/Views/Global/build_slider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class BuildSlider extends StatelessWidget {
valueIndicatorColor: Colors.black,
valueIndicatorTextStyle: TextStyle(
color: Colors.white,
fontSize: 6.sp,
fontSize: 6.spa,
),
),
child: Slider(
Expand Down
20 changes: 10 additions & 10 deletions lib/App/Views/Global/build_time_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,41 @@ class BuildTimeOverlay extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 200.sp,
width: 200.spa,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
color: Get.theme.colorScheme.background,
borderRadius: BorderRadius.circular(4.sp),
color: Get.theme.colorScheme.surface,
borderRadius: BorderRadius.circular(4.spa),
),
child: Column(
children: [
SizedBox(
width: 200.sp,
height: 80.sp,
width: 200.spa,
height: 80.spa,
child: Image.asset(
'assets/images/time.gif',
fit: BoxFit.cover,
),
),
Material(
child: Padding(
padding: EdgeInsets.all(8.0.sp),
padding: EdgeInsets.all(8.0.spa),
child: Column(
children: [
Text(
'Hold tight!',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 6.sp,
fontSize: 6.spa,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 2.sp),
SizedBox(height: 2.spa),
Text(
r'''This might take longer than a snail's coffee break, so feel free to practice your air guitar solos while we work our magic behind the scenes. 🐌🎸''',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 5.sp,
fontSize: 5.spa,
),
),
],
Expand All @@ -58,7 +58,7 @@ class BuildTimeOverlay extends StatelessWidget {
color: Get.theme.colorScheme.secondary,
size: 30,
),
SizedBox(height: 10.sp),
SizedBox(height: 10.spa),
],
),
),
Expand Down
25 changes: 14 additions & 11 deletions lib/App/Views/Pages/Auth/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ class LoginPage extends GetView<LoginController> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
BuildLogo(size: 12.sp),
SizedBox(height: 4.sp),
BuildLogo(size: 12.spa),
SizedBox(height: 4.spa),
Text('Login', style: Get.theme.textTheme.headlineSmall),
SizedBox(height: 4.sp),
SizedBox(height: 4.spa),
Text(
'welcome back to flutter++ ',
style: Get.theme.textTheme.bodySmall,
),
SizedBox(height: 16.sp),
SizedBox(height: 16.spa),
SizedBox(
width: 300,
child: Column(
Expand All @@ -50,27 +50,30 @@ class LoginPage extends GetView<LoginController> {
FormBuilderValidators.email(),
]),
),
SizedBox(height: 3.sp),
SizedBox(height: 3.spa),
SizedBox(
width: Get.width,
child: ElevatedButton(
onPressed: () {
onPressed: () async {
if (formKey.currentState == null) return;

if (formKey.currentState!.saveAndValidate()) {
controller
.login(formKey.currentState!.value);
if (formKey.currentState?.saveAndValidate() ==
true) {
await controller
.login(formKey.currentState?.value);

formKey.currentState?.reset();
}
},
child: const Text('login'),
),
),
SizedBox(height: 10.sp),
SizedBox(height: 10.spa),
const Text(
'Don\'t have an account?',
style: TextStyle(color: Colors.grey),
),
SizedBox(height: 4.sp),
SizedBox(height: 4.spa),
Row(
children: [
Icon(
Expand Down
Loading

0 comments on commit d3b33f3

Please sign in to comment.