我有一个类,该类calendar异步读取文件。
// Copyright 2017 <Abhi Agarwal>
// Refer to LICENSE
// Dart Imports
import 'dart:async';
import 'dart:convert';
// Flutter Imports
import 'package:flutter/services.dart';
// Local Imports
import 'event.dart';
/// Class deals with the school-wide calendar Calendar.
class Calendar {
/// The days off in the year.
List<Event> daysOff = new List<Event>();
/// The half-days, not necessarily days off.
List<Event> halfDays = new List<Event>();
/// Vacations, extended days off.
List<Event> vactations = new List<Event>();
DateTime schoolStart;
DateTime schoolEnd;
DateTime schoolMaxEnd; …Run Code Online (Sandbox Code Playgroud) flutter ×1