Skip to content

Commit

Permalink
minor issues fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidatorCoder committed Jun 5, 2020
1 parent 8dcfa3c commit d3f8299
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 20 deletions.
5 changes: 5 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
analyzer:
errors:
todo: ignore
must_call_super: ignore
missing_return: ignore
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MyApp extends StatelessWidget {
iconTheme: IconThemeData(color: Colors.orange),
textTheme: GoogleFonts.montserratTextTheme(),
primaryTextTheme: TextTheme(
title: TextStyle(color: Colors.black),
headline6: TextStyle(color: Colors.black),
),
primarySwatch: Colors.orange,
),
Expand Down
5 changes: 3 additions & 2 deletions lib/main_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,9 @@ class _MainPageState extends State<MainPage> {
},
child: Text("Yes")),
FlatButton(
onPressed: () =>
{Navigator.of(context).pop()},
onPressed: () {
Navigator.of(context).pop();
},
child: Text("No"))
],
);
Expand Down
28 changes: 17 additions & 11 deletions lib/note_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ class _NotePageState extends State<NotePage> {
errorBorder: InputBorder.none,
disabledBorder: InputBorder.none,
contentPadding: EdgeInsets.fromLTRB(16, 0, 16, 0)),
onChanged: (str) => {updateNoteObject()},
onChanged: (str) {
updateNoteObject();
},
maxLines: null,
controller: _titleController,
focusNode: _titleFocus,
Expand Down Expand Up @@ -166,7 +168,9 @@ class _NotePageState extends State<NotePage> {
errorBorder: InputBorder.none,
disabledBorder: InputBorder.none,
contentPadding: EdgeInsets.fromLTRB(16, 0, 16, 0)),
onChanged: (str) => {updateNoteObject()},
onChanged: (str) {
updateNoteObject();
},
maxLines: 99999,
// line limit extendable later
controller: _contentController,
Expand Down Expand Up @@ -343,7 +347,9 @@ class _NotePageState extends State<NotePage> {
},
child: Text("Yes")),
FlatButton(
onPressed: () => {Navigator.of(context).pop()},
onPressed: () {
Navigator.of(context).pop();
},
child: Text("No"))
],
);
Expand All @@ -369,14 +375,14 @@ class _NotePageState extends State<NotePage> {
}
}

void _saveAndStartNewNote(BuildContext context) {
_persistenceTimer.cancel();
var emptyNote = new Note(
-1, "", "", DateTime.now(), DateTime.now(), Colors.white, 0, 0, 0);
Navigator.of(context).pop();
Navigator.push(
context, CupertinoPageRoute(builder: (ctx) => NotePage(emptyNote)));
}
// void _saveAndStartNewNote(BuildContext context) {
// _persistenceTimer.cancel();
// var emptyNote = new Note(
// -1, "", "", DateTime.now(), DateTime.now(), Colors.white, 0, 0, 0);
// Navigator.of(context).pop();
// Navigator.push(
// context, CupertinoPageRoute(builder: (ctx) => NotePage(emptyNote)));
// }

Future<bool> _readyToPop() async {
_persistenceTimer.cancel();
Expand Down
8 changes: 5 additions & 3 deletions lib/picnote_page.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:convert';
// import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
// import 'dart:typed_data';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
Expand Down Expand Up @@ -425,7 +425,9 @@ class _PhotoPageState extends State<PhotoPage> {
},
child: Text("Yes")),
FlatButton(
onPressed: () => {Navigator.of(context).pop()},
onPressed: () {
Navigator.of(context).pop();
},
child: Text("No"))
],
);
Expand Down
2 changes: 1 addition & 1 deletion lib/staggered_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _StaggeredGridPageState extends State<StaggeredGridPage> {
EdgeInsets _paddingForView(BuildContext context) {
double width = MediaQuery.of(context).size.width;
double padding;
double top_bottom = 8;
// double top_bottom = 8;
if (width > 500) {
padding = (width) * 0.05; // 5% padding of width on both side
} else {
Expand Down
4 changes: 2 additions & 2 deletions lib/staggered_tile.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:convert';
// import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
// import 'dart:typed_data';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:auto_size_text/auto_size_text.dart';
Expand Down

0 comments on commit d3f8299

Please sign in to comment.