Skip to content

Commit 20c3677

Browse files
committed
Base work done here for the time app
1 parent b0541b6 commit 20c3677

File tree

6 files changed

+48
-94
lines changed

6 files changed

+48
-94
lines changed

lib/main.dart

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,8 @@
11
import 'package:flutter/material.dart';
2-
import 'package:ninja_app/quote.dart';
3-
4-
import 'quote_card.dart';
2+
import 'package:ninja_app/screens/home.dart';
53

64
void main() {
75
runApp(MaterialApp(
8-
home: QuoteList(),
6+
home: Home(),
97
));
108
}
11-
12-
class QuoteList extends StatefulWidget {
13-
@override
14-
_QuoteListState createState() => _QuoteListState();
15-
}
16-
17-
class _QuoteListState extends State<QuoteList> {
18-
List<Quote> quotes = [
19-
Quote(text: 'To be or not to be, that is the question', author: 'Hamlet'),
20-
Quote(
21-
text: 'There is no one better that you at being you, don\'t mess it up',
22-
author: 'Humphrey'),
23-
Quote(
24-
text: 'Dogs also think, don\' discredit yourself so quickly',
25-
author: 'Dirty Bag')
26-
];
27-
28-
@override
29-
Widget build(BuildContext context) {
30-
return Scaffold(
31-
backgroundColor: Colors.grey[200],
32-
appBar: AppBar(
33-
title: Text('Awesone Quotes'),
34-
centerTitle: true,
35-
backgroundColor: Colors.redAccent,
36-
),
37-
body: Column(
38-
children: quotes.map((quote) {
39-
return QuoteCard(
40-
quote: quote,
41-
delete: () {
42-
setState(() {
43-
quotes.remove(quote);
44-
});
45-
});
46-
}).toList(),
47-
));
48-
}
49-
}

lib/quote.dart

Lines changed: 0 additions & 10 deletions
This file was deleted.

lib/quote_card.dart

Lines changed: 0 additions & 41 deletions
This file was deleted.

lib/screens/choose_location.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import 'package:flutter/material.dart';
2+
3+
class ChooseLocation extends StatefulWidget {
4+
@override
5+
_ChooseLocationState createState() => _ChooseLocationState();
6+
}
7+
8+
class _ChooseLocationState extends State<ChooseLocation> {
9+
@override
10+
Widget build(BuildContext context) {
11+
return Scaffold(
12+
appBar: AppBar(),
13+
body: Text('Choose Location Screen'),
14+
);
15+
}
16+
}

lib/screens/home.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import 'package:flutter/material.dart';
2+
3+
class Home extends StatefulWidget {
4+
@override
5+
_HomeState createState() => _HomeState();
6+
}
7+
8+
class _HomeState extends State<Home> {
9+
@override
10+
Widget build(BuildContext context) {
11+
return Scaffold(
12+
body: SafeArea(child: Text('Home Screen')),
13+
);
14+
}
15+
}

lib/screens/loading.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import 'package:flutter/material.dart';
2+
3+
class Loading extends StatefulWidget {
4+
@override
5+
_LoadingState createState() => _LoadingState();
6+
}
7+
8+
class _LoadingState extends State<Loading> {
9+
@override
10+
Widget build(BuildContext context) {
11+
return Scaffold(
12+
body: Text('Loading Screen'),
13+
);
14+
}
15+
}

0 commit comments

Comments
 (0)