Skip to content

Commit 2d8c4a4

Browse files
committed
v6.0.0
1 parent c7846b3 commit 2d8c4a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1758
-671
lines changed

.env

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ APP_URL="https://nylo.dev"
55

66
API_BASE_URL="https://your-api.com"
77

8-
ASSET_PATH_PUBLIC="public/assets"
9-
ASSET_PATH_IMAGES="public/assets/images"
10-
TIMEZONE="UTC"
8+
ASSET_PATH_PUBLIC="public"
9+
ASSET_PATH_IMAGES="public/images"
1110
DEFAULT_LOCALE="en"
1211

1312
LIGHT_THEME_ID="light_theme"
1413
DARK_THEME_ID="dark_theme"
1514

16-
AUTH_USER_KEY="AUTH_USER"
15+
SK_USER="SK_USER"

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ This project is open source and MIT-licenced, we welcome any contributions. You
1616

1717
## Features
1818
Some core features available
19-
* [Routing](https://nylo.dev/docs/5.20.0/router).
20-
* [Themes and styling](https://nylo.dev/docs/5.20.0/themes-and-styling).
21-
* [Localization](https://nylo.dev/docs/5.20.0/localization).
22-
* [CLI for generating project files](https://nylo.dev/docs/5.20.0/metro).
23-
* [Elegant API Services for Networking](https://nylo.dev/docs/5.20.0/networking).
24-
* [Creating App Icons](https://nylo.dev/docs/5.20.0/app-icons).
25-
* [Project Configuration](https://nylo.dev/docs/5.20.0/configuration).
26-
* [Streamlined Project Structure](https://nylo.dev/docs/5.20.0/directory-structure).
19+
* [Routing](https://nylo.dev/docs/6.x/router).
20+
* [Themes and styling](https://nylo.dev/docs/6.x/themes-and-styling).
21+
* [Localization](https://nylo.dev/docs/6.x/localization).
22+
* [CLI for generating project files](https://nylo.dev/docs/6.x/metro).
23+
* [Elegant API Services for Networking](https://nylo.dev/docs/6.x/networking).
24+
* [Creating App Icons](https://nylo.dev/docs/6.x/app-icons).
25+
* [Project Configuration](https://nylo.dev/docs/6.x/configuration).
26+
* [Streamlined Project Structure](https://nylo.dev/docs/6.x/directory-structure).
2727

2828
## Requirements
29-
* Dart >= 3.1.3
29+
* Flutter >= 3.24.0
3030

3131
## Getting Started
3232

@@ -38,7 +38,7 @@ git clone https://github.com/nylo-core/nylo.git
3838
View our [docs](https://nylo.dev/docs) and visit [nylo.dev](https://nylo.dev)
3939

4040
## Changelog
41-
Please see [CHANGELOG](https://github.com/nylo-core/framework/blob/5.x/CHANGELOG.md) for more information what has changed recently.
41+
Please see [CHANGELOG](https://github.com/nylo-core/framework/blob/6.x/CHANGELOG.md) for more information what has changed recently.
4242

4343
## Social
4444
* [Twitter](https://twitter.com/nylo_dev)

ios/Podfile.lock

+21-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
PODS:
2+
- app_badge_plus (1.1.6):
3+
- Flutter
24
- Flutter (1.0.0)
5+
- flutter_local_notifications (0.0.1):
6+
- Flutter
37
- flutter_secure_storage (6.0.0):
48
- Flutter
9+
- flutter_timezone (0.0.1):
10+
- Flutter
511
- path_provider_foundation (0.0.1):
612
- Flutter
713
- FlutterMacOS
@@ -12,17 +18,26 @@ PODS:
1218
- Flutter
1319

1420
DEPENDENCIES:
21+
- app_badge_plus (from `.symlinks/plugins/app_badge_plus/ios`)
1522
- Flutter (from `Flutter`)
23+
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
1624
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
25+
- flutter_timezone (from `.symlinks/plugins/flutter_timezone/ios`)
1726
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
1827
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
1928
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
2029

2130
EXTERNAL SOURCES:
31+
app_badge_plus:
32+
:path: ".symlinks/plugins/app_badge_plus/ios"
2233
Flutter:
2334
:path: Flutter
35+
flutter_local_notifications:
36+
:path: ".symlinks/plugins/flutter_local_notifications/ios"
2437
flutter_secure_storage:
2538
:path: ".symlinks/plugins/flutter_secure_storage/ios"
39+
flutter_timezone:
40+
:path: ".symlinks/plugins/flutter_timezone/ios"
2641
path_provider_foundation:
2742
:path: ".symlinks/plugins/path_provider_foundation/darwin"
2843
shared_preferences_foundation:
@@ -31,11 +46,14 @@ EXTERNAL SOURCES:
3146
:path: ".symlinks/plugins/url_launcher_ios/ios"
3247

3348
SPEC CHECKSUMS:
49+
app_badge_plus: 060babf17a97011f0093739f0aa8bc65b2479233
3450
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
51+
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
3552
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
36-
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
37-
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
38-
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586
53+
flutter_timezone: ffb07bdad3c6276af8dada0f11978d8a1f8a20bb
54+
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
55+
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
56+
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
3957

4058
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
4159

lib/app/controllers/controller.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:nylo_framework/nylo_framework.dart';
22

3-
///Controller for the Nylo
4-
/// See more on controllers here - https://nylo.dev/docs/5.20.0/controllers
3+
/// Controller for the Nylo
4+
/// Learn more on controllers here - https://nylo.dev/docs/6.x/controllers
55
class Controller extends NyController {
66
Controller();
77
}
+3-13
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import 'package:flutter/material.dart';
2-
import '/resources/widgets/logo_widget.dart';
3-
import 'package:nylo_framework/nylo_framework.dart';
41
import 'package:url_launcher/url_launcher.dart';
52
import 'controller.dart';
63

74
class HomeController extends Controller {
8-
95
onTapDocumentation() async {
106
await launchUrl(Uri.parse("https://nylo.dev/docs"));
117
}
@@ -15,20 +11,14 @@ class HomeController extends Controller {
1511
}
1612

1713
onTapChangeLog() async {
18-
await launchUrl(Uri.parse(
19-
"https://github.com/nylo-core/nylo/releases"));
14+
await launchUrl(Uri.parse("https://github.com/nylo-core/nylo/releases"));
2015
}
2116

2217
onTapYouTube() async {
2318
await launchUrl(Uri.parse("https://m.youtube.com/@nylo_dev"));
2419
}
2520

26-
showAbout() {
27-
showAboutDialog(
28-
context: context!,
29-
applicationName: getEnv('APP_NAME'),
30-
applicationIcon: const Logo(),
31-
applicationVersion: nyloVersion,
32-
);
21+
onTapX() async {
22+
await launchUrl(Uri.parse("https://x.com/nylo_dev"));
3323
}
3424
}

lib/app/events/login_event.dart

-15
This file was deleted.

lib/app/events/logout_event.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class LogoutEvent implements NyEvent {
1010
class DefaultListener extends NyListener {
1111
@override
1212
handle(dynamic event) async {
13-
// handle the payload from event
13+
await Auth.logout();
14+
15+
routeToInitial();
1416
}
1517
}

lib/app/forms/login_form.dart

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import 'package:nylo_framework/nylo_framework.dart';
2+
3+
/* Login Form
4+
|--------------------------------------------------------------------------
5+
| Usage: https://nylo.dev/docs/6.x/forms#how-it-works
6+
| Casts: https://nylo.dev/docs/6.x/forms#form-casts
7+
| Validation Rules: https://nylo.dev/docs/6.x/validation#validation-rules
8+
|-------------------------------------------------------------------------- */
9+
10+
class LoginForm extends NyFormData {
11+
LoginForm({String? name}) : super(name ?? "login");
12+
13+
@override
14+
fields() => [
15+
Field.email("Email",
16+
autofocus: true,
17+
validate: FormValidator.rule("email"),
18+
style: "compact"),
19+
Field.password("Password",
20+
validate: FormValidator.password(strength: 1), style: "compact"),
21+
];
22+
}

lib/app/forms/register_form.dart

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'package:nylo_framework/nylo_framework.dart';
2+
3+
/* Register Form
4+
|--------------------------------------------------------------------------
5+
| Usage: https://nylo.dev/docs/6.x/forms#how-it-works
6+
| Casts: https://nylo.dev/docs/6.x/forms#form-casts
7+
| Validation Rules: https://nylo.dev/docs/6.x/validation#validation-rules
8+
|-------------------------------------------------------------------------- */
9+
10+
class RegisterForm extends NyFormData {
11+
RegisterForm({String? name}) : super(name ?? "register");
12+
13+
@override
14+
fields() => [
15+
Field.text("Name",
16+
autofocus: true,
17+
validate: FormValidator.notEmpty(),
18+
style: "compact"),
19+
Field.email("Email", validate: FormValidator.email(), style: "compact"),
20+
Field.password("Password",
21+
validate: FormValidator.password(strength: 1), style: "compact"),
22+
];
23+
}

lib/app/forms/style/form_style.dart

+99-19
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,105 @@ import 'package:flutter/material.dart';
22
import 'package:nylo_framework/nylo_framework.dart';
33

44
class FormStyle extends NyFormStyle {
5-
65
/// TextField styles
7-
// @override
8-
// FormStyleTextField textField(BuildContext context, Field field) {
9-
// return {
10-
// 'custom_style': (textField) => textField.copyWith(
11-
//
12-
// ),
13-
// 'default': (NyTextField textField) => textField.copyWith(
14-
// decoration: InputDecoration(
15-
// border: InputBorder.none,
16-
// filled: true,
17-
// fillColor: Colors.blue.shade100,
18-
// labelText: field.name,
19-
// hintText: 'Enter ${field.name}',
20-
// ),
21-
// ),
22-
// };
23-
// }
6+
@override
7+
FormStyleTextField textField(BuildContext context, Field field) {
8+
return {
9+
'minimal': (NyTextField textField) => textField.copyWith(
10+
decorator: DecoratorTextField(
11+
decoration: (dynamic data, InputDecoration inputDecoration) =>
12+
inputDecoration.copyWith(
13+
filled: true,
14+
fillColor: Colors.grey.shade100,
15+
isDense: true,
16+
hintText: "${field.name}",
17+
focusedBorder: OutlineInputBorder(
18+
borderRadius: BorderRadius.all(Radius.circular(12)),
19+
borderSide: BorderSide(color: Colors.red, width: 2)),
20+
enabledBorder: OutlineInputBorder(
21+
borderRadius: BorderRadius.all(Radius.circular(12)),
22+
borderSide: BorderSide(color: Colors.transparent)),
23+
contentPadding:
24+
EdgeInsetsDirectional.symmetric(vertical: 13, horizontal: 13),
25+
border: OutlineInputBorder(
26+
borderRadius: BorderRadius.circular(12),
27+
borderSide: const BorderSide(
28+
width: 0,
29+
style: BorderStyle.none,
30+
),
31+
),
32+
),
33+
successDecoration:
34+
(dynamic data, InputDecoration inputDecoration) =>
35+
inputDecoration.copyWith(
36+
prefixIcon: Icon(Icons.person),
37+
focusedBorder: OutlineInputBorder(
38+
borderRadius: BorderRadius.all(Radius.circular(12)),
39+
borderSide: BorderSide(color: Colors.green, width: 2)),
40+
enabledBorder: OutlineInputBorder(
41+
borderRadius: BorderRadius.all(Radius.circular(12)),
42+
borderSide: BorderSide(color: Colors.green, width: 2),
43+
),
44+
),
45+
errorDecoration: (dynamic data, InputDecoration inputDecoration) =>
46+
inputDecoration.copyWith(
47+
focusedErrorBorder: OutlineInputBorder(
48+
borderRadius: BorderRadius.all(Radius.circular(12)),
49+
borderSide: BorderSide(color: Colors.orange, width: 2),
50+
),
51+
errorStyle: TextStyle(color: Colors.red),
52+
errorBorder: OutlineInputBorder(
53+
borderRadius: BorderRadius.all(Radius.circular(12)),
54+
borderSide: BorderSide(color: Colors.orange, width: 2),
55+
),
56+
border: InputBorder.none),
57+
)),
58+
'default': (NyTextField textField) => textField.copyWith(
59+
decorator: DecoratorTextField(
60+
decoration: (dynamic data, InputDecoration inputDecoration) =>
61+
inputDecoration.copyWith(
62+
filled: true,
63+
fillColor: Colors.grey.shade100,
64+
isDense: true,
65+
hintText: "${field.name}",
66+
focusedBorder: OutlineInputBorder(
67+
borderRadius: BorderRadius.all(Radius.circular(12)),
68+
borderSide: BorderSide(color: Colors.transparent)),
69+
enabledBorder: OutlineInputBorder(
70+
borderRadius: BorderRadius.all(Radius.circular(12)),
71+
borderSide: BorderSide(color: Colors.transparent)),
72+
contentPadding:
73+
EdgeInsetsDirectional.symmetric(vertical: 13, horizontal: 13),
74+
border: OutlineInputBorder(
75+
borderRadius: BorderRadius.circular(12),
76+
borderSide: const BorderSide(
77+
width: 0,
78+
style: BorderStyle.none,
79+
),
80+
),
81+
),
82+
successDecoration:
83+
(dynamic data, InputDecoration inputDecoration) =>
84+
inputDecoration.copyWith(
85+
focusedBorder: OutlineInputBorder(
86+
borderRadius: BorderRadius.all(Radius.circular(12)),
87+
borderSide: BorderSide(color: Colors.green, width: 2)),
88+
),
89+
errorDecoration: (dynamic data, InputDecoration inputDecoration) =>
90+
inputDecoration.copyWith(
91+
focusedErrorBorder: OutlineInputBorder(
92+
borderRadius: BorderRadius.all(Radius.circular(12)),
93+
borderSide: BorderSide(color: Colors.orange, width: 2),
94+
),
95+
errorStyle: TextStyle(color: Colors.red),
96+
errorBorder: OutlineInputBorder(
97+
borderRadius: BorderRadius.all(Radius.circular(12)),
98+
borderSide: BorderSide(color: Colors.orange, width: 2),
99+
),
100+
),
101+
)),
102+
};
103+
}
24104

25105
/// Checkbox styles
26106
// @override
@@ -31,4 +111,4 @@ class FormStyle extends NyFormStyle {
31111
// ),
32112
// };
33113
// }
34-
}
114+
}

lib/app/models/user.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ class User extends Model {
44
String? name;
55
String? email;
66

7-
User();
7+
static StorageKey key = 'user';
8+
9+
User() : super(key: key);
810

911
User.fromJson(dynamic data) {
1012
name = data['name'];

0 commit comments

Comments
 (0)