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