-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to latest Flutter version and rewrite entire codebase from sc…
…ratch - Change version to v1.3.0+4. - Close #27.
- Loading branch information
1 parent
5bfb3b6
commit d090551
Showing
22 changed files
with
12,337 additions
and
535 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
include: package:lint/analysis_options.yaml | ||
include: package:lint/strict.yaml | ||
|
||
linter: | ||
rules: | ||
always_use_package_imports: false | ||
prefer_relative_imports: true | ||
prefer_single_quotes: true | ||
prefer_single_quotes: true | ||
avoid_classes_with_only_static_members: false |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import '../models/command_type.dart'; | ||
|
||
class Constants { | ||
static const Map<CommandType, String> descriptions = { | ||
CommandType.execute: | ||
'Execute an SQL query with no return value.\n\nFor example:\nCREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, value INTEGER);', | ||
CommandType.insert: | ||
"Execute an SQL INSERT query and show the last inserted row ID\n\nFor example:\nINSERT INTO users(name, value) VALUES('Adit', 1234);", | ||
CommandType.query: | ||
'Execute an SQL SELECT query and show the output.\n\nFor example:\nSELECT * FROM users;', | ||
CommandType.update: | ||
"Execute an SQL UPDATE query and show the number of changes made.\n\nFor example:\nUPDATE users SET name = 'Adit Luhadia', value = 1234 WHERE name = 'Adit';", | ||
CommandType.delete: | ||
"Execute an SQL DELETE query and show the number of changes made.\n\nFor example:\nDELETE FROM users WHERE name = 'Adit';", | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class Responsive extends StatelessWidget { | ||
final Widget mobile; | ||
final Widget? tablet; | ||
final Widget desktop; | ||
|
||
const Responsive({ | ||
super.key, | ||
required this.mobile, | ||
this.tablet, | ||
required this.desktop, | ||
}); | ||
|
||
static bool isMobile(BuildContext context) => | ||
MediaQuery.of(context).size.width < 850; | ||
|
||
static bool isTablet(BuildContext context) => | ||
MediaQuery.of(context).size.width < 1100 && | ||
MediaQuery.of(context).size.width >= 850; | ||
|
||
static bool isDesktop(BuildContext context) => | ||
MediaQuery.of(context).size.width >= 1100; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final Size size = MediaQuery.of(context).size; | ||
|
||
if (size.width >= 1100) { | ||
return desktop; | ||
} else if (size.width >= 850 && tablet != null) { | ||
return tablet!; | ||
} else { | ||
return mobile; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
enum CommandType { | ||
execute, | ||
insert, | ||
query, | ||
update, | ||
delete, | ||
} |
Oops, something went wrong.