Skip to content

Commit

Permalink
初步优化项目结构
Browse files Browse the repository at this point in the history
  • Loading branch information
toly1994328 committed Sep 26, 2021
1 parent d3cc349 commit f16d031
Show file tree
Hide file tree
Showing 147 changed files with 965 additions and 2,016 deletions.
Binary file modified assets/flutter.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:ui';

import 'package:bloc/bloc.dart';
import 'package:flutter_unit/app/res/cons.dart';
import 'package:flutter_unit/model/enums.dart';
import 'package:flutter_unit/widget_system/repositories/model/enums.dart';

class SelectTab {
final WidgetFamily family;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_unit/app/res/cons.dart';
import 'package:flutter_unit/app/res/sp.dart';
import 'package:flutter_unit/repositories/app_start.dart';
import 'package:flutter_unit/repositories/local_storage.dart';
import 'package:flutter_unit/widget_system/repositories/repositories.dart';
import 'package:shared_preferences/shared_preferences.dart';

import 'global_event.dart';
Expand Down
File renamed without changes.
File renamed without changes.
44 changes: 22 additions & 22 deletions lib/app/router/unit_router.dart
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
import 'package:flutter/material.dart';
import 'package:flutter_unit/model/category_model.dart';
import 'package:flutter_unit/model/widget_model.dart';
import 'package:flutter_unit/point_system/views/issues_point/issues_detail.dart';
import 'package:flutter_unit/point_system/views/issues_point/issues_point_page.dart';
import 'package:flutter_unit/widget_system/repositories/model/category_model.dart';
import 'package:flutter_unit/widget_system/repositories/model/widget_model.dart';
import 'package:flutter_unit/user_system/pages/login/login_page.dart';
import 'package:flutter_unit/user_system/pages/register/register_page.dart';
import 'package:flutter_unit/views/pages/about/about_app_page.dart';
import 'package:flutter_unit/views/pages/about/about_me_page.dart';
import 'package:flutter_unit/views/pages/about/version_info.dart';
import 'package:flutter_unit/views/navigation/unit_navigation.dart';
import 'package:flutter_unit/widget_system/widget_category/view/category_detail.dart';
import 'package:flutter_unit/widget_system/widget_category/view/collect_page.dart';
import 'package:flutter_unit/views/pages/data_manage/data_manage_page.dart';

import 'package:flutter_unit/painter_system/gallery_page.dart';
import 'package:flutter_unit/views/pages/issues_point/issues_detail.dart';
import 'package:flutter_unit/views/pages/issues_point/issues_point_page.dart';
import 'package:flutter_unit/views/pages/search/serach_page.dart';
import 'package:flutter_unit/views/pages/setting/code_style_setting.dart';
import 'package:flutter_unit/views/pages/setting/font_setting.dart';
import 'package:flutter_unit/views/pages/setting/item_style_setting.dart';
import 'package:flutter_unit/views/pages/setting/setting_page.dart';
import 'package:flutter_unit/views/pages/setting/theme_color_setting.dart';
import 'package:flutter_unit/views/pages/unit_todo/attr_unit_page.dart';
import 'package:flutter_unit/views/pages/unit_todo/layout_unit_page.dart';
import 'package:flutter_unit/views/pages/unit_todo/point_unit_page.dart';
import 'package:flutter_unit/widget_system/widget_detail/view/widget_detail_page.dart';

import 'package:flutter_unit/app/views/about/about_app_page.dart';
import 'package:flutter_unit/app/views/about/about_me_page.dart';
import 'package:flutter_unit/app/views/about/version_info.dart';
import 'package:flutter_unit/app/views/navigation/unit_navigation.dart';
import 'package:flutter_unit/app/views/data_manage/data_manage_page.dart';
import 'package:flutter_unit/app/views/setting/code_style_setting.dart';
import 'package:flutter_unit/app/views/setting/font_setting.dart';
import 'package:flutter_unit/app/views/setting/item_style_setting.dart';
import 'package:flutter_unit/app/views/setting/setting_page.dart';
import 'package:flutter_unit/app/views/setting/theme_color_setting.dart';
import 'package:flutter_unit/app/views/unit_todo/attr_unit_page.dart';
import 'package:flutter_unit/app/views/unit_todo/layout_unit_page.dart';
import 'package:flutter_unit/app/views/unit_todo/point_unit_page.dart';

import 'package:flutter_unit/widget_system/views/widget_system_view.dart';

import 'router_utils.dart';

class UnitRouter {
static const String widget_detail = '/widget_detail';

static const String detail = 'detail';
static const String search = 'search';
static const String search = 'search_bloc';
static const String nav = 'nav';

static const String collect = 'CollectPage';
Expand Down
2 changes: 1 addition & 1 deletion lib/app/utils/convert.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:flutter_unit/model/enums.dart';
import 'package:flutter_unit/widget_system/repositories/model/enums.dart';
import 'package:flutter_unit/painter_system/gallery_factory.dart';

/// create by 张风捷特烈 on 2020-03-07
Expand Down
2 changes: 1 addition & 1 deletion lib/app/utils/stream_ext/backpressure.dart
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class _BackpressureStreamSink<S, T> implements ForwardingSink<S, T> {
// startBufferEvery = 3
// last buffer: [0, 1]
// 0 is the first event,
// the n-the event is not yet dispatched at this point
// the n-the event is not yet dispatched at this point_bloc
// skip becomes 1
// event 2 is skipped, skip becomes 0
// event 3 is now added to the buffer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class AboutAppPage extends StatelessWidget {
children: <Widget>[
FeedbackWidget(
onPressed: () =>
_launchURL("https://github.com/toly1994328/FlutterUnit"),
_launchURL("https://github_model.com/toly1994328/FlutterUnit"),
child: Wrap(
direction: Axis.vertical,
crossAxisAlignment: WrapCrossAlignment.center,
Expand Down Expand Up @@ -154,7 +154,7 @@ class AboutAppPage extends StatelessWidget {
info: ' Flutter Unit 是一个非盈利性的开源项目,'
'旨在提供全面的Flutter学习指南及编程者的交流技术的接口。'
'由【张风捷特烈】提供技术支持和全权维护。唯一开源网站网址: '
'https://github.com/toly1994328/FlutterUnit',
'https://github_model.com/toly1994328/FlutterUnit',
),
Divider(
height: 20,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class AboutMePage extends StatelessWidget {
)),
FeedbackWidget(
onPressed: () =>
_launchURL("https://github.com/toly1994328"),
_launchURL("https://github_model.com/toly1994328"),
child: Wrap(
direction: Axis.vertical,
crossAxisAlignment: WrapCrossAlignment.center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_unit/app/api/app_info.dart';

import 'package:flutter_unit/app/utils/Toast.dart';
import 'package:flutter_unit/app/utils/convert.dart';
import 'package:flutter_unit/app/utils/http_utils/http_util.dart';
import 'package:flutter_unit/app/utils/http_utils/result_bean.dart';
import 'package:flutter_unit/point_system/api/app_info.dart';
import 'package:install_plugin/install_plugin.dart';
import 'package:package_info/package_info.dart';
import 'package:path/path.dart' as path;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

import 'package:flutter/material.dart';
import 'package:flutter_unit/app/api/app_info.dart';
import 'package:flutter_unit/app/res/str_unit.dart';

import 'package:flutter_unit/app/res/style/behavior/no_scroll_behavior.dart';
import 'package:flutter_unit/app/router/unit_router.dart';
import 'package:flutter_unit/app/utils/http_utils/result_bean.dart';

import 'package:flutter_unit/views/components/permanent/circle_image.dart';
import 'package:flutter_unit/views/components/permanent/feedback_widget.dart';
import 'package:url_launcher/url_launcher.dart';
Expand Down Expand Up @@ -107,7 +106,7 @@ class VersionInfo extends StatelessWidget {
children: <Widget>[
FeedbackWidget(
onPressed: (){
_launchURL("https://github.com/toly1994328/FlutterUnit");
_launchURL("https://github_model.com/toly1994328/FlutterUnit");
},
child: Text('《查看本项目Github仓库》',style: TextStyle(fontSize: 12,color: Color(0xff616C84),),)),
Text('Power By 张风捷特烈',style: TextStyle(fontSize: 12,color: Colors.grey),),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_unit/app/api/category_api.dart';

import 'package:flutter_unit/app/res/toly_icon.dart';
import 'package:flutter_unit/app/utils/Toast.dart';
import 'package:flutter_unit/app/utils/http_utils/result_bean.dart';
import 'package:flutter_unit/blocs/bloc_exp.dart';
import 'package:flutter_unit/model/category_model.dart';
import 'package:flutter_unit/repositories/local_db.dart';
import 'package:flutter_unit/repositories/rep/category_repository.dart';
import 'package:flutter_unit/point_system/api/category_api.dart';

import 'package:flutter_unit/widget_system/repositories/model/category_model.dart';
import 'package:flutter_unit/widget_system/repositories/repositories.dart';

import 'package:flutter_unit/user_system/component/authentic_widget.dart';
import 'package:flutter_unit/widget_system/blocs/widget_system_bloc.dart';
import 'package:path/path.dart' as path;
import 'package:sqflite/sqflite.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_unit/repositories/app_start.dart';
import 'package:flutter_unit/repositories/local_db.dart';
import 'package:flutter_unit/repositories/rep/impl/catagory_db_repository.dart';
import 'package:flutter_unit/repositories/rep/impl/widget_db_repository.dart';
import 'package:flutter_unit/repositories/rep/widget_repository.dart';
import 'package:flutter_unit/app/blocs/global/global_bloc.dart';
import 'package:flutter_unit/app/blocs/global/global_event.dart';
import 'package:flutter_unit/point_system/blocs/point_system_bloc.dart';
import 'package:flutter_unit/widget_system/repositories/repositories.dart';
import 'package:flutter_unit/user_system/bloc/authentic/bloc.dart';
import 'package:flutter_unit/user_system/bloc/authentic/event.dart';
import 'package:flutter_unit/user_system/bloc/login/bloc.dart';
import 'package:flutter_unit/user_system/bloc/register/bloc.dart';
import 'package:flutter_unit/model/enums.dart';
import 'package:flutter_unit/blocs/bloc_exp.dart';
import 'package:flutter_unit/widget_system/widget_detail/bloc/detail/detail_bloc.dart';
import 'package:flutter_unit/widget_system/widget_home/bloc/widgets_bloc.dart';

import 'package:flutter_unit/widget_system/blocs/widget_system_bloc.dart';



/// create by 张风捷特烈 on 2020/4/28
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_unit/app/blocs/global/global_bloc.dart';
import 'package:flutter_unit/app/blocs/global/global_state.dart';
import 'package:flutter_unit/app/res/cons.dart';
import 'package:flutter_unit/app/res/str_unit.dart';
import 'package:flutter_unit/app/router/unit_router.dart';
import 'package:flutter_unit/blocs/bloc_exp.dart';
import 'package:flutter_unit/views/navigation/color_change_bloc.dart';
import 'package:flutter_unit/views/pages/splash/unit_splash.dart';

import 'package:flutter_unit/app/blocs/color_change_bloc.dart';
import 'package:flutter_unit/app/views/splash/unit_splash.dart';


/// create by 张风捷特烈 on 2020/4/28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_unit/app/res/cons.dart';
import 'package:flutter_unit/app/router/unit_router.dart';
import 'package:flutter_unit/blocs/bloc_exp.dart';

import 'package:flutter_unit/painter_system/gallery_unit.dart';
import 'package:flutter_unit/user_system/pages/user/user_page.dart';
import 'package:flutter_unit/views/components/project/nav/unit_bottom_bar.dart';
import 'package:flutter_unit/views/components/project/overlay_tool_wrapper.dart';
import 'package:flutter_unit/widget_system/blocs/widget_system_bloc.dart';

import 'package:flutter_unit/widget_system/widget_category/view/collect_page.dart';
import 'package:flutter_unit/widget_system/widget_category/view/home_right_drawer.dart';

import 'package:flutter_unit/widget_system/views/widget_system_view.dart';

import 'package:flutter_unit/widget_system/widget_home/view/home_drawer.dart';
import 'package:flutter_unit/widget_system/widget_home/view/home_page.dart';

import 'color_change_bloc.dart';
import '../../blocs/color_change_bloc.dart';

/// create by 张风捷特烈 on 2020-04-11
/// contact me by email [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_unit/app/blocs/global/global_bloc.dart';
import 'package:flutter_unit/app/blocs/global/global_event.dart';
import 'package:flutter_unit/app/blocs/global/global_state.dart';
import 'package:flutter_unit/app/res/cons.dart';
import 'package:flutter_unit/blocs/bloc_exp.dart';

import 'package:flutter_unit/views/components/permanent/code/code_widget.dart';
import 'package:flutter_unit/views/components/permanent/code/highlighter_style.dart';
import 'package:flutter_unit/views/components/permanent/feedback_widget.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_unit/app/res/cons.dart';
import 'package:flutter_unit/blocs/bloc_exp.dart';
import 'package:flutter_unit/app/blocs/global/global_bloc.dart';
import 'package:flutter_unit/app/blocs/global/global_event.dart';
import 'package:flutter_unit/app/blocs/global/global_state.dart';
import 'package:flutter_unit/views/components/permanent/feedback_widget.dart';
import 'package:flutter_unit/views/components/permanent/circle.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_unit/blocs/bloc_exp.dart';
import 'package:flutter_unit/app/blocs/global/global_bloc.dart';
import 'package:flutter_unit/app/blocs/global/global_event.dart';
import 'package:flutter_unit/app/blocs/global/global_state.dart';
import 'package:flutter_unit/views/components/permanent/feedback_widget.dart';
import 'package:flutter_unit/views/components/permanent/circle.dart';
import 'package:flutter_unit/views/components/project/items/widget/home_item_support.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_unit/app/router/unit_router.dart';
import 'package:flutter_unit/app/res/toly_icon.dart';
import 'package:flutter_unit/blocs/bloc_exp.dart';
import 'package:flutter_unit/app/blocs/global/global_bloc.dart';
import 'package:flutter_unit/app/blocs/global/global_event.dart';
import 'package:flutter_unit/app/blocs/global/global_state.dart';

class SettingPage extends StatelessWidget {
@override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_unit/app/res/cons.dart';
import 'package:flutter_unit/blocs/bloc_exp.dart';
import 'package:flutter_unit/app/blocs/global/global_bloc.dart';
import 'package:flutter_unit/app/blocs/global/global_event.dart';
import 'package:flutter_unit/app/blocs/global/global_state.dart';
import 'package:flutter_unit/views/components/permanent/feedback_widget.dart';
import 'package:flutter_unit/views/components/permanent/circle.dart';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_unit/app/res/str_unit.dart';
import 'package:flutter_unit/app/router/unit_router.dart';
import 'package:flutter_unit/blocs/bloc_exp.dart';
import 'package:flutter_unit/model/enums.dart';
import 'package:flutter_unit/views/pages/splash/splash_bottom.dart';
import 'package:flutter_unit/widget_system/widget_home/bloc/widgets_bloc.dart';
import 'package:flutter_unit/widget_system/widget_home/bloc/widgets_event.dart';
import 'package:flutter_unit/widget_system/repositories/model/enums.dart';
import 'package:flutter_unit/app/views/splash/splash_bottom.dart';
import 'package:flutter_unit/widget_system/blocs/widget_system_bloc.dart';
import 'package:flutter_unit/app/blocs/global/global_bloc.dart';
import 'package:flutter_unit/app/blocs/global/global_state.dart';

import 'flutter_unit_text.dart';
import 'unit_paint.dart';
Expand Down
File renamed without changes.
35 changes: 0 additions & 35 deletions lib/blocs/bloc_exp.dart

This file was deleted.

5 changes: 3 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

import 'views/navigation/bloc_wrapper.dart';
import 'views/navigation/flutter_unit.dart';
import 'app/views/navigation/bloc_wrapper.dart';
import 'app/views/navigation/flutter_unit.dart';


void main() {
WidgetsFlutterBinding.ensureInitialized();
Expand Down
Loading

0 comments on commit f16d031

Please sign in to comment.