mirror of
https://github.com/git-touch/git-touch
synced 2024-12-19 19:54:54 +01:00
refactor: microtask
This commit is contained in:
parent
dd093bc7f7
commit
271e8bd761
@ -20,8 +20,7 @@ class NewsScreenState extends State<NewsScreen> {
|
||||
@override
|
||||
initState() {
|
||||
super.initState();
|
||||
// FIXME:
|
||||
nextTick(() async {
|
||||
Future.microtask(() async {
|
||||
// Check if there are unread notification items.
|
||||
// 1 item is enough since count is not displayed for now.
|
||||
var items = await Provider.of<AuthModel>(context)
|
||||
|
@ -51,13 +51,6 @@ Color getFontColorByBrightness(Color color) {
|
||||
return showWhite ? Colors.white : Colors.black;
|
||||
}
|
||||
|
||||
void nextTick(Function callback, [int milliseconds = 0]) {
|
||||
// FIXME:
|
||||
Future.delayed(Duration(milliseconds: 0)).then((_) {
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
TextSpan createLinkSpan(
|
||||
BuildContext context,
|
||||
String text,
|
||||
|
Loading…
Reference in New Issue
Block a user