Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
refactor: move to lib/src for dartdevc
  • Loading branch information
Rannie committed Dec 27, 2019
1 parent 4cf9838 commit 7dc4b03
Show file tree
Hide file tree
Showing 43 changed files with 171 additions and 182 deletions.
6 changes: 4 additions & 2 deletions example/lib/main.dart
Expand Up @@ -112,8 +112,10 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
final ThemeMode themeMode = Util.themeMode;
final FLToastStyle style =
isDarkMode ? FLToastStyle.light : FLToastStyle.dark;
final FLToastDefaults toastDefaults =
FLToastDefaults(style: style, position: _defaults.position, textDirection: Util.textDirection);
final FLToastDefaults toastDefaults = FLToastDefaults(
style: style,
position: _defaults.position,
textDirection: Util.textDirection);

return FLToastProvider(
defaults: toastDefaults,
Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/count_stepper_page.dart
@@ -1,6 +1,6 @@
import 'package:example/pages/page_util.dart';
import 'package:flutter/material.dart';
import 'package:flui/widgets/count_stepper.dart';
import 'package:flui/flui.dart';

class CountStepperPage extends StatefulWidget {
static const String routeName = '/count-stepper';
Expand Down
3 changes: 2 additions & 1 deletion example/lib/pages/toast_page.dart
Expand Up @@ -101,7 +101,8 @@ class _ToastPageState extends State<ToastPage> {
child: Image.asset('assets/record.gif', scale: 2));

_hideCustomToast = FLToast.show(
text: 'Swipe up to cancel sending', contentBuilder: (context) => mic);
text: 'Swipe up to cancel sending',
contentBuilder: (context) => mic);
},
onLongPressEnd: (LongPressEndDetails details) {
if (_hideCustomToast != null) {
Expand Down
64 changes: 32 additions & 32 deletions example/pubspec.lock
Expand Up @@ -5,70 +5,70 @@ packages:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.5"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.14.11"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.3"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3"
event_bus:
dependency: "direct main"
description:
name: event_bus
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
flui:
Expand Down Expand Up @@ -97,84 +97,84 @@ packages:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.4"
logger:
dependency: "direct main"
description:
name: logger
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.6"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.8"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.4"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.0"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.5"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.5.6"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.1+3"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.2+2"
sky_engine:
Expand All @@ -186,70 +186,70 @@ packages:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.5.5"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.9.3"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.5"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.11"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.6"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.3"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.5.0"
sdks:
Expand Down
50 changes: 25 additions & 25 deletions lib/flui.dart
@@ -1,27 +1,27 @@
library flui;

export 'package:flui/common/defines.dart';
export 'package:flui/widgets/flat_button.dart';
export 'package:flui/widgets/raised_button.dart';
export 'package:flui/widgets/gradient_button.dart';
export 'package:flui/widgets/loading_button.dart';
export 'package:flui/widgets/bubble.dart';
export 'package:flui/widgets/bubble_menu.dart';
export 'package:flui/widgets/avatar.dart';
export 'package:flui/widgets/badge.dart';
export 'package:flui/widgets/copyable_label.dart';
export 'package:flui/widgets/toast.dart';
export 'package:flui/widgets/primary_color_override.dart';
export 'package:flui/widgets/pin_input.dart';
export 'package:flui/widgets/auto_complete.dart';
export 'package:flui/widgets/empty.dart';
export 'package:flui/widgets/marquee_label.dart';
export 'package:flui/widgets/notice_bar.dart';
export 'package:flui/widgets/skeleton.dart';
export 'package:flui/widgets/image.dart';
export 'package:flui/widgets/action_sheet.dart';
export 'package:flui/widgets/operation_sheet.dart';
export 'package:flui/widgets/appbar_title.dart';
export 'package:flui/widgets/static_list.dart';
export 'package:flui/widgets/list_tile.dart';
export 'package:flui/widgets/count_stepper.dart';
export 'package:flui/src/common/defines.dart';
export 'package:flui/src/widgets/flat_button.dart';
export 'package:flui/src/widgets/raised_button.dart';
export 'package:flui/src/widgets/gradient_button.dart';
export 'package:flui/src/widgets/loading_button.dart';
export 'package:flui/src/widgets/bubble.dart';
export 'package:flui/src/widgets/bubble_menu.dart';
export 'package:flui/src/widgets/avatar.dart';
export 'package:flui/src/widgets/badge.dart';
export 'package:flui/src/widgets/copyable_label.dart';
export 'package:flui/src/widgets/toast.dart';
export 'package:flui/src/widgets/primary_color_override.dart';
export 'package:flui/src/widgets/pin_input.dart';
export 'package:flui/src/widgets/auto_complete.dart';
export 'package:flui/src/widgets/empty.dart';
export 'package:flui/src/widgets/marquee_label.dart';
export 'package:flui/src/widgets/notice_bar.dart';
export 'package:flui/src/widgets/skeleton.dart';
export 'package:flui/src/widgets/image.dart';
export 'package:flui/src/widgets/action_sheet.dart';
export 'package:flui/src/widgets/operation_sheet.dart';
export 'package:flui/src/widgets/appbar_title.dart';
export 'package:flui/src/widgets/static_list.dart';
export 'package:flui/src/widgets/list_tile.dart';
export 'package:flui/src/widgets/count_stepper.dart';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flui/common/defines.dart';
import 'package:flui/src/common/defines.dart';

class FLFlatButton extends StatelessWidget {
const FLFlatButton(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flui/widgets/marquee_label.dart';
import 'package:flui/src/widgets/marquee_label.dart';

const Color FLNoticeBarTintColor = const Color(0xFFF76A24);
const Color FLNoticeBarBackgroundColor = const Color(0xFFFEFCEC);
Expand Down
@@ -1,5 +1,5 @@
import 'package:flui/widgets/action_sheet.dart';
import 'package:flui/widgets/image.dart';
import 'package:flui/src/widgets/action_sheet.dart';
import 'package:flui/src/widgets/image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

Expand Down
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flui/common/defines.dart';
import 'package:flui/src/common/defines.dart';

class FLRaisedButton extends StatelessWidget {
FLRaisedButton({
Expand Down
File renamed without changes.
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flui/widgets/flat_button.dart';
import 'package:flui/widgets/list_tile.dart';
import 'package:flui/src/widgets/flat_button.dart';
import 'package:flui/src/widgets/list_tile.dart';

enum FLStaticListCellType { normal, button, customization }

Expand Down
3 changes: 2 additions & 1 deletion lib/widgets/toast.dart → lib/src/widgets/toast.dart
Expand Up @@ -473,7 +473,8 @@ class _FLToastViewState extends State<_FLToastView>
Widget build(BuildContext context) {
final MediaQueryData mediaQueryData = MediaQueryData.fromWindow(ui.window);
final double marginTop = widget.topOffset + mediaQueryData.padding.top;
final double marginBottom = widget.bottomOffset + mediaQueryData.padding.bottom;
final double marginBottom =
widget.bottomOffset + mediaQueryData.padding.bottom;
MainAxisAlignment alignment = MainAxisAlignment.center;
if (widget.position == FLToastPosition.top)
alignment = MainAxisAlignment.start;
Expand Down

0 comments on commit 7dc4b03

Please sign in to comment.