remodl_rte 1.0.6 copy "remodl_rte: ^1.0.6" to clipboard
remodl_rte: ^1.0.6 copied to clipboard

HTML editor for Flutter (WYSIWYG, rich text) with built-in speech-to-text and custom features for Remodl.

example/lib/main.dart

import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:remodl_rte/remodl_rte.dart';
import 'fullscreen.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const HtmlEditorExampleApp());
}

class HtmlEditorExampleApp extends StatelessWidget {
  const HtmlEditorExampleApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Rich Text with Dictation',
      debugShowCheckedModeBanner: false,
      scrollBehavior: MyCustomScrollBehavior(),
      theme: ThemeData(),
      darkTheme: ThemeData.dark(),
      themeMode: ThemeMode.light,
      home: const Fullscreen(),
    );
  }
}

class HtmlEditorExample extends StatefulWidget {
  const HtmlEditorExample({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<HtmlEditorExample> createState() => _HtmlEditorExampleState();
}

class _HtmlEditorExampleState extends State<HtmlEditorExample> {
  String result = '';
  final HtmlEditorController controller = HtmlEditorController();

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
        onTap: () {
          if (!kIsWeb) {
            controller.clearFocus();
          }
        },
        child: const Fullscreen());
  }
}

class MyCustomScrollBehavior extends MaterialScrollBehavior {
  // Override behavior methods and getters like dragDevices
  @override
  Set<PointerDeviceKind> get dragDevices => {
        PointerDeviceKind.touch,
        PointerDeviceKind.mouse,
      };
}
2
likes
140
points
37
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

HTML editor for Flutter (WYSIWYG, rich text) with built-in speech-to-text and custom features for Remodl.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flex_color_picker, flutter, meta, numberpicker, pointer_interceptor, speech_to_text, webview_flutter

More

Packages that depend on remodl_rte