Fix prefer_final_locals warnings
This commit is contained in:
parent
b70ad80bd8
commit
139e3c7835
5 changed files with 5 additions and 4 deletions
|
@ -55,6 +55,7 @@ analyzer:
|
||||||
prefer_const_constructors: warning
|
prefer_const_constructors: warning
|
||||||
prefer_const_declarations: warning
|
prefer_const_declarations: warning
|
||||||
prefer_const_constructors_in_immutables: warning
|
prefer_const_constructors_in_immutables: warning
|
||||||
|
prefer_final_locals: warning
|
||||||
unnecessary_const: error
|
unnecessary_const: error
|
||||||
cancel_subscriptions: error
|
cancel_subscriptions: error
|
||||||
|
|
||||||
|
|
|
@ -645,7 +645,7 @@ class FilesDB {
|
||||||
inParam = inParam.substring(0, inParam.length - 1);
|
inParam = inParam.substring(0, inParam.length - 1);
|
||||||
final db = await instance.database;
|
final db = await instance.database;
|
||||||
final order = (asc ?? false ? 'ASC' : 'DESC');
|
final order = (asc ?? false ? 'ASC' : 'DESC');
|
||||||
String whereClause =
|
final String whereClause =
|
||||||
'$columnCollectionID IN ($inParam) AND $columnCreationTime >= ? AND '
|
'$columnCollectionID IN ($inParam) AND $columnCreationTime >= ? AND '
|
||||||
'$columnCreationTime <= ? AND $columnOwnerID = ?';
|
'$columnCreationTime <= ? AND $columnOwnerID = ?';
|
||||||
final List<Object> whereArgs = [startTime, endTime, userID];
|
final List<Object> whereArgs = [startTime, endTime, userID];
|
||||||
|
|
|
@ -27,7 +27,7 @@ class HomeGalleryWidget extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double bottomSafeArea = MediaQuery.of(context).padding.bottom;
|
final double bottomSafeArea = MediaQuery.of(context).padding.bottom;
|
||||||
final gallery = Gallery(
|
final gallery = Gallery(
|
||||||
asyncLoader: (creationStartTime, creationEndTime, {limit, asc}) async {
|
asyncLoader: (creationStartTime, creationEndTime, {limit, asc}) async {
|
||||||
final ownerID = Configuration.instance.getUserID();
|
final ownerID = Configuration.instance.getUserID();
|
||||||
|
|
|
@ -505,7 +505,7 @@ class FadingAppBarState extends State<FadingAppBar> {
|
||||||
await dialog.show();
|
await dialog.show();
|
||||||
try {
|
try {
|
||||||
final io.File fileToSave = await getFile(file);
|
final io.File fileToSave = await getFile(file);
|
||||||
var m = MediaExtension();
|
final m = MediaExtension();
|
||||||
final bool result = await m.setAs("file://${fileToSave.path}", "image/*");
|
final bool result = await m.setAs("file://${fileToSave.path}", "image/*");
|
||||||
if (result == false) {
|
if (result == false) {
|
||||||
showShortToast(context, "Something went wrong");
|
showShortToast(context, "Something went wrong");
|
||||||
|
|
|
@ -91,7 +91,7 @@ class FadingBottomBarState extends State<FadingBottomBar> {
|
||||||
if (widget.file is TrashFile) {
|
if (widget.file is TrashFile) {
|
||||||
_addTrashOptions(children);
|
_addTrashOptions(children);
|
||||||
}
|
}
|
||||||
bool isUploadedByUser = widget.file.uploadedFileID != null &&
|
final bool isUploadedByUser = widget.file.uploadedFileID != null &&
|
||||||
widget.file.ownerID == Configuration.instance.getUserID();
|
widget.file.ownerID == Configuration.instance.getUserID();
|
||||||
bool isFileHidden = false;
|
bool isFileHidden = false;
|
||||||
if (isUploadedByUser) {
|
if (isUploadedByUser) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue