flutter_responsive_cursor 0.0.3 copy "flutter_responsive_cursor: ^0.0.3" to clipboard
flutter_responsive_cursor: ^0.0.3 copied to clipboard

discontinued

Editable text widget with native-like cursor behavior

example/example.dart

import 'package:flutter/material.dart';
import 'package:flutter_responsive_cursor/flutter_responsive_cursor.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  var _controller = TextEditingController.fromValue(TextEditingValue(text: 'Hello'));

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ResponsiveCursorEditableText(
              controller: _controller,
              cursorColor: Colors.lightBlue,
              focusNode: FocusNode(),
              style: Theme.of(context).textTheme.body1,
            ),
            ResponsiveCursorTextField(
              cursorColor: Colors.lightBlue,
              style: Theme.of(context).textTheme.body1,
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Editable text widget with native-like cursor behavior

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, rxdart

More

Packages that depend on flutter_responsive_cursor