| class _RestClient implements RestClient { | class _RestClient implements RestClient { | ||||
| _RestClient(this._dio, {this.baseUrl}) { | _RestClient(this._dio, {this.baseUrl}) { | ||||
| ArgumentError.checkNotNull(_dio, '_dio'); | ArgumentError.checkNotNull(_dio, '_dio'); | ||||
| this.baseUrl ??= 'http://tpf.aztrace.vn'; | |||||
| this.baseUrl ??= 'https://tpf.aztrace.vn'; | |||||
| } | } | ||||
| final Dio _dio; | final Dio _dio; |
| return Center(child: Text(state.errorString)); | return Center(child: Text(state.errorString)); | ||||
| } else if (state is NotiSuccess) { | } else if (state is NotiSuccess) { | ||||
| if (state.items.isEmpty) { | if (state.items.isEmpty) { | ||||
| return Center(child: Text("Dữ liệu rỗng")); | |||||
| return Center(child: Text("Không có thông báo")); | |||||
| } | } | ||||
| currentItems = List<NotificationDTO>.from(state.items); | currentItems = List<NotificationDTO>.from(state.items); | ||||
| currentPage = state.page; | currentPage = state.page; |
| static int kExpiredTime = 12 * 60 * 60 * 1000; //24h | static int kExpiredTime = 12 * 60 * 60 * 1000; //24h | ||||
| static int kFileSize = 1000000; //1M = 1000.000 bytes | static int kFileSize = 1000000; //1M = 1000.000 bytes | ||||
| static int kMaxAgeCache = 7; // 7days | static int kMaxAgeCache = 7; // 7days | ||||
| static const String baseUrl = "http://tpf.aztrace.vn"; | |||||
| static const String baseImageUrl = "http://tpf.aztrace.vn/upload/"; | |||||
| static const String baseUrl = "https://tpf.aztrace.vn"; | |||||
| static const String baseImageUrl = "https://tpf.aztrace.vn/upload/"; | |||||
| static RegExp regExpDecimal = RegExp("[0-9,]"); | static RegExp regExpDecimal = RegExp("[0-9,]"); | ||||
| static const String apiDetailNursery = "api/activity-nursery"; | static const String apiDetailNursery = "api/activity-nursery"; |
| description: A new Flutter project. | description: A new Flutter project. | ||||
| publish_to: 'none' | publish_to: 'none' | ||||
| version: 0.12.0+1 | |||||
| version: 0.13.0+1 | |||||
| environment: | environment: | ||||
| sdk: ">=2.7.0 <3.0.0" | sdk: ">=2.7.0 <3.0.0" |