Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 15 additions & 36 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:notes_era/spalsh.dart';
import 'package:notes_era/welcome.dart';
import 'package:notes_era/signup.dart';
import 'package:notes_era/login.dart';
import 'package:notes_era/listnotes.dart';
import 'package:notes_era/expandnote.dart';
import 'package:notes_era/pages/spalsh.dart';
import 'package:notes_era/utils/theme.dart';
import 'package:notes_era/pages/welcome.dart';
import 'package:notes_era/pages/signup.dart';
import 'package:notes_era/pages/login.dart';
import 'package:notes_era/pages/listnotes.dart';
import 'package:notes_era/pages/expandnote.dart';

void main() {
runApp(const MyApp());
Expand All @@ -21,38 +21,17 @@ class MyApp extends StatelessWidget {
initialRoute: '/',
themeMode: ThemeMode.system,
routes: {
'/': (context) => Splash(),
'/welcome': (context) => Welcome(),
'/signup': (context) => Signup(),
'/login': (context) => Login(),
'/list': (context) => ListNotes(),
'/expand': (context) => ExpandNotes()
'/': (context) => const Splash(),
'/welcome': (context) => const Welcome(),
'/signup': (context) => const Signup(),
'/login': (context) => const Login(),
'/list': (context) => const ListNotes(),
'/expand': (context) => const ExpandNotes()
},
// Light theme details
theme: ThemeData(
primaryColor: Colors.white,
brightness: Brightness.light,
scaffoldBackgroundColor: Colors.white,
primaryColorDark: Colors.black,
canvasColor: Colors.white,
dividerColor: const Color(0xff888888),
appBarTheme: const AppBarTheme(
systemOverlayStyle:
SystemUiOverlayStyle(statusBarBrightness: Brightness.light)),
),
theme: lightTheme(),
// Dark theme details
darkTheme: ThemeData(
primaryColor: Colors.black,
primaryColorLight: Colors.black,
brightness: Brightness.dark,
primaryColorDark: Colors.white,
indicatorColor: Colors.white,
canvasColor: Colors.black,
appBarTheme: const AppBarTheme(
systemOverlayStyle:
SystemUiOverlayStyle(statusBarBrightness: Brightness.dark)),
dividerColor: Colors.white,
),
darkTheme: darkTheme(),
);
}
}
60 changes: 60 additions & 0 deletions lib/model/notes.model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import 'package:flutter/material.dart';

import '../pages/listnotes.dart';

List<Widget> notes = [
const NoteListTile(
title: 'How to design using Photoshop',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Design | MLSC',
date: '2022/09/07',
fillColor: Color(0xffD9EFFF),
borderColor: Color(0xff3C7DFB),
),
const NoteListTile(
title: 'How to be market a product?',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Marketing | MLSC',
date: '2022/09/07',
fillColor: Color(0xffFFE6D8),
borderColor: Color.fromARGB(255, 255, 125, 50),
),
const NoteListTile(
title: 'How to use Final Cut Pro',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Design | MLSC',
date: '2022/09/07',
fillColor: Color(0xffEFFFDA),
borderColor: Color.fromARGB(255, 100, 176, 0),
),
const NoteListTile(
title: 'How to be market a product?',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Marketing | MLSC',
date: '2022/09/07',
fillColor: Color(0xffF4D4FF),
borderColor: Color.fromARGB(255, 150, 0, 200),
),
const NoteListTile(
title: 'How to design using Photoshop',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Design | MLSC',
date: '2022/09/07',
fillColor: Color(0xffFFCED4),
borderColor: Color.fromARGB(255, 255, 104, 121),
),
const NoteListTile(
title: 'How to design using Photoshop',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Design | MLSC',
date: '2022/09/07',
fillColor: Color(0xffFFF7AB),
borderColor: Color.fromARGB(255, 240, 216, 0),
),
];
1 change: 0 additions & 1 deletion lib/expandnote.dart → lib/pages/expandnote.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class _BodyState extends State<Body> {
late TextEditingController textController;
@override
void initState() {
// TODO: implement initState
super.initState();
textController = TextEditingController(text: widget.existingText ?? "");
}
Expand Down
97 changes: 17 additions & 80 deletions lib/listnotes.dart → lib/pages/listnotes.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import 'package:flutter/material.dart';
import 'package:notes_era/widget/text.custom.dart';

import '../model/notes.model.dart';

class ListNotes extends StatefulWidget {
const ListNotes({Key? key}) : super(key: key);
Expand Down Expand Up @@ -65,13 +68,7 @@ class _ListNotesState extends State<ListNotes>
height: 30,
),
const SizedBox(width: 10),
Text(
'NoteBook',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
color: Theme.of(context).textTheme.bodyText1!.color),
),
const CustomText(name: 'NoteBook'),
const Spacer(),
IconButton(
onPressed: () {},
Expand All @@ -94,12 +91,12 @@ class _ListNotesState extends State<ListNotes>
}

class NotesListBody extends StatelessWidget {
NotesListBody({
const NotesListBody({
Key? key,
required this.tabController,
}) : super(key: key);

TabController tabController;
final TabController tabController;

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -149,7 +146,7 @@ class NotesListBody extends StatelessWidget {
}

class NoteListTile extends StatefulWidget {
NoteListTile({
const NoteListTile({
super.key,
required this.title,
required this.noteText,
Expand All @@ -158,12 +155,12 @@ class NoteListTile extends StatefulWidget {
required this.fillColor,
required this.borderColor,
});
String title;
String noteText;
String tag;
String date;
Color fillColor;
Color borderColor;
final String title;
final String noteText;
final String tag;
final String date;
final Color fillColor;
final Color borderColor;

@override
State<NoteListTile> createState() => _NoteListTileState();
Expand Down Expand Up @@ -191,13 +188,10 @@ class _NoteListTileState extends State<NoteListTile> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.title,
style: TextStyle(
fontFamily: Theme.of(context).textTheme.bodyText1!.fontFamily,
fontWeight: FontWeight.bold,
fontSize: 16,
),
CustomText(
name: widget.title,
fontFamily: Theme.of(context).textTheme.bodyText1!.fontFamily,
fontSize: 16,
),
const SizedBox(height: 15),
if (isExpanded) Text(widget.noteText),
Expand All @@ -215,60 +209,3 @@ class _NoteListTileState extends State<NoteListTile> {
);
}
}

List<Widget> notes = [
NoteListTile(
title: 'How to design using Photoshop',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Design | MLSC',
date: '2022/09/07',
fillColor: const Color(0xffD9EFFF),
borderColor: const Color(0xff3C7DFB),
),
NoteListTile(
title: 'How to be market a product?',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Marketing | MLSC',
date: '2022/09/07',
fillColor: const Color(0xffFFE6D8),
borderColor: const Color.fromARGB(255, 255, 125, 50),
),
NoteListTile(
title: 'How to use Final Cut Pro',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Design | MLSC',
date: '2022/09/07',
fillColor: const Color(0xffEFFFDA),
borderColor: const Color.fromARGB(255, 100, 176, 0),
),
NoteListTile(
title: 'How to be market a product?',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Marketing | MLSC',
date: '2022/09/07',
fillColor: const Color(0xffF4D4FF),
borderColor: const Color.fromARGB(255, 150, 0, 200),
),
NoteListTile(
title: 'How to design using Photoshop',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Design | MLSC',
date: '2022/09/07',
fillColor: const Color(0xffFFCED4),
borderColor: const Color.fromARGB(255, 255, 104, 121),
),
NoteListTile(
title: 'How to design using Photoshop',
noteText:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',
tag: 'Design | MLSC',
date: '2022/09/07',
fillColor: const Color(0xffFFF7AB),
borderColor: const Color.fromARGB(255, 240, 216, 0),
),
];
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions lib/utils/theme.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

ThemeData lightTheme() {
return ThemeData(
primaryColor: Colors.white,
brightness: Brightness.light,
scaffoldBackgroundColor: Colors.white,
primaryColorDark: Colors.black,
canvasColor: Colors.white,
dividerColor: const Color(0xff888888),
appBarTheme: const AppBarTheme(
systemOverlayStyle:
SystemUiOverlayStyle(statusBarBrightness: Brightness.light)),
);
}

ThemeData darkTheme() {
return ThemeData(
primaryColor: Colors.black,
primaryColorLight: Colors.black,
brightness: Brightness.dark,
primaryColorDark: Colors.white,
indicatorColor: Colors.white,
canvasColor: Colors.black,
appBarTheme: const AppBarTheme(
systemOverlayStyle:
SystemUiOverlayStyle(statusBarBrightness: Brightness.dark)),
dividerColor: Colors.white,
);
}
29 changes: 29 additions & 0 deletions lib/widget/text.custom.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import 'package:flutter/material.dart';

class CustomText extends StatelessWidget {
const CustomText({
Key? key,
required this.name,
this.fontWeight,
this.fontSize,
this.color,
this.fontFamily,
}) : super(key: key);
final String name;
final FontWeight? fontWeight;
final double? fontSize;
final Color? color;
final String? fontFamily;

@override
Widget build(BuildContext context) {
return Text(
name,
style: TextStyle(
fontWeight: fontWeight ?? FontWeight.bold,
fontSize: fontSize ?? 24,
fontFamily: fontFamily ?? '',
color: color ?? Theme.of(context).textTheme.bodyText1!.color),
);
}
}