forked from lxm_flutter/FlutterUnit
✨ 去除无用文件
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter_unit/app/utils/http/http_util.dart';
|
||||
import 'package:flutter_unit/app/utils/http/rep_result.dart';
|
||||
|
||||
/// create by 张风捷特烈 on 2020/6/17
|
||||
/// contact me by email 1981462002@qq.com
|
||||
/// 说明:
|
||||
|
||||
class GithubApi {
|
||||
// static Future<RepResult> authorizations({String base64}) async {
|
||||
// var result = await HttpUtil.getInstance().post("/authorizations",
|
||||
// options: Options(headers: {"Authorization": "Basic $base64"}),
|
||||
// data: {
|
||||
// "scopes": ["user", "repo", "gist", "notifications"],
|
||||
// "note": "admin_script",
|
||||
// "client_id": GithubClientConfig.clientId,
|
||||
// "client_secret": GithubClientConfig.clientSecret
|
||||
// });
|
||||
//
|
||||
// return result;
|
||||
// }
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
import 'package:flutter_unit/app/utils/http/http_util.dart';
|
||||
import 'package:flutter_unit/app/utils/http/rep_result.dart';
|
||||
import 'package:flutter_unit/model/github/repository.dart';
|
||||
|
||||
/// create by 张风捷特烈 on 2020/6/17
|
||||
/// contact me by email 1981462002@qq.com
|
||||
/// 说明:
|
||||
|
||||
class ReposApi{
|
||||
|
||||
static Future<RepResult> getRepos({String username="toly1994328",String repository="FlutterUnit"}) async {
|
||||
|
||||
var result = await HttpUtil.getInstance().get("/repos/$username/$repository");
|
||||
|
||||
result.data = Repository.fromJson(result.data);
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_unit/views/app/bloc_wrapper.dart';
|
||||
import 'views/app/flutter_app.dart';
|
||||
import 'views/app/flutter_unit.dart';
|
||||
|
||||
void main() => runApp(BlocWrapper(child: FlutterApp()));
|
||||
void main() => runApp(BlocWrapper(child: FlutterUnit()));
|
||||
|
||||
@@ -8,7 +8,7 @@ import 'package:flutter_unit/views/app/splash/unit_splash.dart';
|
||||
/// contact me by email 1981462002@qq.com
|
||||
/// 说明:
|
||||
|
||||
class FlutterApp extends StatelessWidget {
|
||||
class FlutterUnit extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocBuilder<GlobalBloc, GlobalState>(builder: (_, state) {
|
||||
@@ -1,19 +0,0 @@
|
||||
import 'package:flutter_unit/app/api/github/issues_api.dart';
|
||||
|
||||
/// create by 张风捷特烈 on 2020/6/17
|
||||
/// contact me by email 1981462002@qq.com
|
||||
/// 说明:
|
||||
|
||||
main() {
|
||||
getIssues();
|
||||
}
|
||||
|
||||
void getIssues() async {
|
||||
var result = await IssuesApi.getIssues(
|
||||
username: "toly1994328",
|
||||
repository: "FlutterUnit",
|
||||
labels: "point",
|
||||
pageSize: 2);
|
||||
|
||||
print(result);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import 'package:flutter_unit/app/api/github/issues_api.dart';
|
||||
import 'package:flutter_unit/app/api/github/repos_api.dart';
|
||||
|
||||
/// create by 张风捷特烈 on 2020/6/17
|
||||
/// contact me by email 1981462002@qq.com
|
||||
/// 说明:
|
||||
|
||||
main() {
|
||||
getRepos();
|
||||
}
|
||||
|
||||
void getRepos() async {
|
||||
var result = await ReposApi.getRepos(
|
||||
username: "toly1994328",
|
||||
repository: "FlutterUnit");
|
||||
print(result);
|
||||
}
|
||||
Reference in New Issue
Block a user