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:
Vishesh Handa
2020-11-10 19:07:09 +01:00
parent 5507953be9
commit 5571fdb65e
13 changed files with 54 additions and 41 deletions

View File

@ -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();
}