Merge pull request #12 from itgaia/master
issue: Unsupported operation: Platform._operatingSystem
This commit is contained in:
commit
100cbe99d4
6
.gitignore
vendored
6
.gitignore
vendored
@ -73,3 +73,9 @@ build/
|
|||||||
!**/ios/**/default.mode2v3
|
!**/ios/**/default.mode2v3
|
||||||
!**/ios/**/default.pbxuser
|
!**/ios/**/default.pbxuser
|
||||||
!**/ios/**/default.perspectivev3
|
!**/ios/**/default.perspectivev3
|
||||||
|
|
||||||
|
# ITG additions
|
||||||
|
|
||||||
|
.notes
|
||||||
|
.DS_Store
|
||||||
|
.idea
|
||||||
|
@ -42,7 +42,7 @@ class RichEditorState extends State<RichEditor> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
if (Platform.isIOS) {
|
if (!kIsWeb && Platform.isIOS) {
|
||||||
_initServer();
|
_initServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ class RichEditorState extends State<RichEditor> {
|
|||||||
if (_controller != null) {
|
if (_controller != null) {
|
||||||
_controller = null;
|
_controller = null;
|
||||||
}
|
}
|
||||||
if (!Platform.isAndroid) {
|
if (!kIsWeb && !Platform.isAndroid) {
|
||||||
localServer!.close();
|
localServer!.close();
|
||||||
}
|
}
|
||||||
super.dispose();
|
super.dispose();
|
||||||
@ -96,7 +96,7 @@ class RichEditorState extends State<RichEditor> {
|
|||||||
onWebViewCreated: (controller) async {
|
onWebViewCreated: (controller) async {
|
||||||
_controller = controller;
|
_controller = controller;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
if (!Platform.isAndroid) {
|
if (!kIsWeb && !Platform.isAndroid) {
|
||||||
await _loadHtmlFromAssets();
|
await _loadHtmlFromAssets();
|
||||||
} else {
|
} else {
|
||||||
await _controller!.loadUrl(
|
await _controller!.loadUrl(
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rich_editor/src/utils/javascript_executor_base.dart';
|
import 'package:rich_editor/src/utils/javascript_executor_base.dart';
|
||||||
import 'package:rich_editor/src/widgets/check_dialog.dart';
|
import 'package:rich_editor/src/widgets/check_dialog.dart';
|
||||||
@ -193,7 +194,7 @@ class EditorToolBar extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
// TODO: Show font button on iOS
|
// TODO: Show font button on iOS
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: Platform.isAndroid,
|
visible: (!kIsWeb && Platform.isAndroid),
|
||||||
child: TabButton(
|
child: TabButton(
|
||||||
tooltip: 'Font face',
|
tooltip: 'Font face',
|
||||||
icon: Icons.font_download,
|
icon: Icons.font_download,
|
||||||
|
Loading…
Reference in New Issue
Block a user