小编Abh*_*wal的帖子

如何等待Class初始化?

我有一个类,该类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

4
推荐指数
1
解决办法
1630
查看次数

标签 统计

flutter ×1