-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated dependencies * Updated config.. (Added more elements in config) * Updated version
- Loading branch information
1 parent
4ff5f55
commit cc59324
Showing
10 changed files
with
318 additions
and
133 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:paginated_items_builder/paginated_items_builder.dart'; | ||
|
||
/// ConfigDefaults | ||
class ConfigDefaults { | ||
/// getByType | ||
static dynamic getByType<T>([String? mockItemKey]) => null; | ||
|
||
/// noItemsTextGetter | ||
static String noItemsTextGetter(String name) { | ||
final beforeCapitalLetter = RegExp(r"(?=[A-Z])"); | ||
name = name | ||
.split(beforeCapitalLetter) | ||
.map( | ||
(e) => e.toLowerCase(), | ||
) | ||
.join(' '); | ||
|
||
return "No ${name}s found!"; | ||
} | ||
|
||
/// errorTextGetter | ||
static String errorTextGetter(dynamic error) => 'Something went wrong!'; | ||
|
||
/// showLoaderOnResetGetter | ||
static bool showLoaderOnResetGetter(scope) => | ||
scope != ItemsFetchScope.pullDownToRefresh; | ||
|
||
/// defaultTextStyle | ||
static const defaultTextStyle = TextStyle( | ||
fontWeight: FontWeight.w600, | ||
fontSize: 14, | ||
); | ||
|
||
/// defaultLoader | ||
static const defaultLoader = Center( | ||
child: CircularProgressIndicator.adaptive(), | ||
); | ||
|
||
/// logErrors | ||
static const logErrors = true; | ||
|
||
/// customScrollPhysics | ||
static const customScrollPhysics = null; | ||
|
||
/// padding | ||
static const padding = null; | ||
} |
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
Oops, something went wrong.