mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-14 15:33:17 +08:00
Use time.dart
I'm sacrificing const code for readability. So maybe I'll lose a bit of performance, but this is so much easier to read.
This commit is contained in:
@ -2,6 +2,8 @@ import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:time/time.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
@ -92,7 +94,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
overlayState.insert(suggestionTagoverlayEntry);
|
||||
|
||||
// Removes the over lay entry from the Overly after 500 milliseconds
|
||||
await Future.delayed(const Duration(milliseconds: 5000));
|
||||
await Future.delayed(5000.milliseconds);
|
||||
suggestionTagoverlayEntry.remove();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user