|
@@ -5,7 +5,7 @@ import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
|
|
import 'package:flowy_infra_ui/style_widget/button.dart';
|
|
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
|
|
import 'package:flowy_infra_ui/widget/spacing.dart';
|
|
|
-import 'package:flowy_log/flowy_log.dart';
|
|
|
+import 'package:flowy_sdk/log.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter/services.dart';
|
|
|
import 'package:provider/provider.dart';
|
|
@@ -48,14 +48,14 @@ class QuestionBubble extends StatelessWidget {
|
|
|
case BubbleAction.debug:
|
|
|
final deviceInfoPlugin = DeviceInfoPlugin();
|
|
|
final deviceInfo = deviceInfoPlugin.deviceInfo;
|
|
|
-
|
|
|
+
|
|
|
deviceInfo.then((info) {
|
|
|
var debugText = "";
|
|
|
info.toMap().forEach((key, value) {
|
|
|
debugText = debugText + "$key: $value\n";
|
|
|
});
|
|
|
|
|
|
- Clipboard.setData(ClipboardData( text: debugText ));
|
|
|
+ Clipboard.setData(ClipboardData(text: debugText));
|
|
|
|
|
|
Widget toast = Container(
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
|
|
@@ -64,8 +64,8 @@ class QuestionBubble extends StatelessWidget {
|
|
|
color: theme.main1,
|
|
|
),
|
|
|
child: Row(
|
|
|
- mainAxisSize: MainAxisSize.min,
|
|
|
- children: [
|
|
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
+ children: [
|
|
|
const Icon(Icons.check),
|
|
|
const SizedBox(
|
|
|
width: 12.0,
|
|
@@ -76,9 +76,9 @@ class QuestionBubble extends StatelessWidget {
|
|
|
);
|
|
|
|
|
|
fToast.showToast(
|
|
|
- child: toast,
|
|
|
- gravity: ToastGravity.BOTTOM,
|
|
|
- toastDuration: const Duration(seconds: 3),
|
|
|
+ child: toast,
|
|
|
+ gravity: ToastGravity.BOTTOM,
|
|
|
+ toastDuration: const Duration(seconds: 3),
|
|
|
);
|
|
|
}).catchError((error) {
|
|
|
Log.info("Debug info has not yet been implemented on this platform");
|
|
@@ -90,8 +90,8 @@ class QuestionBubble extends StatelessWidget {
|
|
|
color: Colors.red,
|
|
|
),
|
|
|
child: Row(
|
|
|
- mainAxisSize: MainAxisSize.min,
|
|
|
- children: [
|
|
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
+ children: [
|
|
|
const Icon(Icons.close),
|
|
|
const SizedBox(
|
|
|
width: 12.0,
|
|
@@ -102,9 +102,9 @@ class QuestionBubble extends StatelessWidget {
|
|
|
);
|
|
|
|
|
|
fToast.showToast(
|
|
|
- child: toast,
|
|
|
- gravity: ToastGravity.BOTTOM,
|
|
|
- toastDuration: const Duration(seconds: 3),
|
|
|
+ child: toast,
|
|
|
+ gravity: ToastGravity.BOTTOM,
|
|
|
+ toastDuration: const Duration(seconds: 3),
|
|
|
);
|
|
|
}, test: (e) => e is UnimplementedError);
|
|
|
break;
|
|
@@ -213,11 +213,7 @@ class FlowyVersionDescription extends StatelessWidget {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-enum BubbleAction {
|
|
|
- whatsNews,
|
|
|
- help,
|
|
|
- debug
|
|
|
-}
|
|
|
+enum BubbleAction { whatsNews, help, debug }
|
|
|
|
|
|
class BubbleActionWrapper extends ActionItem {
|
|
|
final BubbleAction inner;
|