Skip to content

Commit 2d157c5

Browse files
committed
flutter format
1 parent a50fafa commit 2d157c5

File tree

8 files changed

+102
-114
lines changed

8 files changed

+102
-114
lines changed

lib/app/controllers/controller.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import 'package:nylo_framework/controllers/controller.dart';
22

33
class Controller extends BaseController {
4-
54
Controller();
6-
75
}

lib/app/controllers/home_controller.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import 'package:url_launcher/url_launcher.dart';
22
import 'controller.dart';
33

44
class HomeController extends Controller {
5-
65
onTapDocumentation() {
76
launch("https://nylo.dev/docs");
87
}

lib/app/networking/api_service.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ import 'package:http/http.dart';
1010
/// To learn more about the API spec, check out our documentation here
1111
/// https://nylo.dev/docs/1.x/metro#what-is-an-apispec
1212
class ApiService extends BaseApi {
13-
1413
var _client;
1514

1615
ApiService() : _client = new Client();
17-
18-
19-
2016
}

lib/bootstrap/helpers.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
// Add your helper methods here
2+
// Add your helper methods here

lib/config/app_theme.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ class AppTheme extends AppColors {
5959
? _scaffoldLightColor.withOpacity(opacity)
6060
: _scaffoldDarkColor.withOpacity(opacity));
6161
}
62-
}
62+
}

lib/resources/pages/home_page.dart

Lines changed: 92 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -16,112 +16,108 @@ class MyHomePage extends StatefulPageWidget {
1616
}
1717

1818
class _MyHomePageState extends NyState<MyHomePage> {
19-
2019
@override
21-
widgetDidLoad() async {
22-
23-
}
20+
widgetDidLoad() async {}
2421

2522
@override
2623
Widget build(BuildContext context) {
2724
return Scaffold(
28-
appBar: AppBar(
29-
title: Text(widget.title),
30-
),
31-
body: SafeAreaContainerWidget(
32-
child: Center(
33-
child: Column(
34-
crossAxisAlignment: CrossAxisAlignment.center,
35-
mainAxisAlignment: MainAxisAlignment.center,
36-
children: <Widget>[
37-
Image.asset(
38-
getImageAsset("nylo_logo.png"),
39-
height: 100,
40-
width: 100,
41-
),
42-
Text(
43-
getEnv("APP_NAME"),
44-
style: Theme.of(context).textTheme.headline2,
45-
),
46-
Text(
47-
"Micro-framework for Flutter",
48-
style: Theme.of(context).accentTextTheme.subtitle1,
49-
textAlign: TextAlign.center,
50-
),
51-
Text(
52-
"Build something amazing 💡️",
53-
style: Theme.of(context).textTheme.bodyText2,
54-
textAlign: TextAlign.center,
55-
),
56-
Column(
57-
crossAxisAlignment: CrossAxisAlignment.center,
58-
mainAxisAlignment: MainAxisAlignment.start,
59-
children: <Widget>[
60-
Divider(),
61-
Container(
62-
width: double.infinity,
63-
margin:
64-
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
65-
padding:
66-
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
67-
decoration: BoxDecoration(
68-
color: Colors.white70,
69-
borderRadius: BorderRadius.circular(8),
70-
boxShadow: [
71-
BoxShadow(
72-
color: Colors.grey.withOpacity(0.1),
73-
spreadRadius: 1,
74-
blurRadius: 9,
75-
offset:
76-
Offset(0, 3), // changes position of shadow
25+
appBar: AppBar(
26+
title: Text(widget.title),
27+
),
28+
body: SafeAreaContainerWidget(
29+
child: Center(
30+
child: Column(
31+
crossAxisAlignment: CrossAxisAlignment.center,
32+
mainAxisAlignment: MainAxisAlignment.center,
33+
children: <Widget>[
34+
Image.asset(
35+
getImageAsset("nylo_logo.png"),
36+
height: 100,
37+
width: 100,
38+
),
39+
Text(
40+
getEnv("APP_NAME"),
41+
style: Theme.of(context).textTheme.headline2,
42+
),
43+
Text(
44+
"Micro-framework for Flutter",
45+
style: Theme.of(context).accentTextTheme.subtitle1,
46+
textAlign: TextAlign.center,
47+
),
48+
Text(
49+
"Build something amazing 💡️",
50+
style: Theme.of(context).textTheme.bodyText2,
51+
textAlign: TextAlign.center,
52+
),
53+
Column(
54+
crossAxisAlignment: CrossAxisAlignment.center,
55+
mainAxisAlignment: MainAxisAlignment.start,
56+
children: <Widget>[
57+
Divider(),
58+
Container(
59+
width: double.infinity,
60+
margin:
61+
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
62+
padding:
63+
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
64+
decoration: BoxDecoration(
65+
color: Colors.white70,
66+
borderRadius: BorderRadius.circular(8),
67+
boxShadow: [
68+
BoxShadow(
69+
color: Colors.grey.withOpacity(0.1),
70+
spreadRadius: 1,
71+
blurRadius: 9,
72+
offset:
73+
Offset(0, 3), // changes position of shadow
74+
),
75+
]),
76+
child: ListView(
77+
shrinkWrap: true,
78+
children: [
79+
MaterialButton(
80+
child: Text(
81+
trans(context, "documentation").capitalize(),
82+
style: Theme.of(context).textTheme.bodyText1,
83+
),
84+
onPressed: widget.controller.onTapDocumentation,
7785
),
78-
]),
79-
child: ListView(
80-
shrinkWrap: true,
81-
children: [
82-
MaterialButton(
83-
child: Text(
84-
trans(context, "documentation").capitalize(),
85-
style: Theme.of(context).textTheme.bodyText1,
86+
Divider(
87+
height: 0,
8688
),
87-
onPressed: widget.controller.onTapDocumentation,
88-
),
89-
Divider(
90-
height: 0,
91-
),
92-
MaterialButton(
93-
child: Text(
94-
"GitHub",
95-
style: Theme.of(context).textTheme.bodyText1,
89+
MaterialButton(
90+
child: Text(
91+
"GitHub",
92+
style: Theme.of(context).textTheme.bodyText1,
93+
),
94+
onPressed: widget.controller.onTapGithub,
9695
),
97-
onPressed: widget.controller.onTapGithub,
98-
),
99-
Divider(
100-
height: 0,
101-
),
102-
MaterialButton(
103-
child: Text(
104-
trans(context, "changelog").capitalize(),
105-
style: Theme.of(context).textTheme.bodyText1,
96+
Divider(
97+
height: 0,
10698
),
107-
onPressed: widget.controller.onTapChangeLog,
108-
),
109-
],
99+
MaterialButton(
100+
child: Text(
101+
trans(context, "changelog").capitalize(),
102+
style: Theme.of(context).textTheme.bodyText1,
103+
),
104+
onPressed: widget.controller.onTapChangeLog,
105+
),
106+
],
107+
),
108+
),
109+
Text(
110+
nyloVersion,
111+
style: Theme.of(context)
112+
.textTheme
113+
.bodyText2
114+
.copyWith(color: Colors.grey),
110115
),
111-
),
112-
Text(
113-
nyloVersion,
114-
style: Theme.of(context)
115-
.textTheme
116-
.bodyText2
117-
.copyWith(color: Colors.grey),
118-
),
119-
],
120-
),
121-
],
116+
],
117+
),
118+
],
119+
),
122120
),
123-
),
124-
)
125-
);
121+
),);
126122
}
127123
}

lib/resources/widgets/safearea_container_widget.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import 'package:flutter/material.dart';
22

33
class SafeAreaContainerWidget extends StatelessWidget {
44
final Widget child;
5-
const SafeAreaContainerWidget({ Key key, this.child }) : super(key: key);
5+
const SafeAreaContainerWidget({Key key, this.child}) : super(key: key);
66

77
@override
88
Widget build(BuildContext context) {
99
return SafeArea(
10-
minimum: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
11-
child: child
12-
);
10+
minimum: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
11+
child: child,);
1312
}
1413
}

lib/routes/router.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import 'package:nylo_framework/router/router.dart';
99

1010
buildRouter() => nyCreateRoutes((router) {
1111

12-
router.route("/", (context) => MyHomePage(
13-
title: "Hello World",
14-
));
12+
router.route("/", (context) => MyHomePage(
13+
title: "Hello World",
14+
));
1515

16-
// Add your routes here
16+
// Add your routes here
1717

18-
});
18+
});

0 commit comments

Comments
 (0)