flutter_social_textfield 0.1.2 copy "flutter_social_textfield: ^0.1.2" to clipboard
flutter_social_textfield: ^0.1.2 copied to clipboard

TextEditingController and RichText / TextSpan builder with hashtag, url and mention detection with Regular Expressions. Also with tap support.

example/lib/main.dart

import 'package:example/bottom_sheet_example.dart';
import 'package:example/text_span_example.dart';
import 'package:flutter/material.dart';

import 'default_controller_above.example.dart';
import 'default_controller_example.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 Social Text Field'),
    );
  }
}

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

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
        actions: [
        ],
      ),
      body: ListView(
        children: [
          ListTile(
            title: Text("DefaultSocialTextFieldController Example"),
            subtitle: Text("Editable Text field implementations"),
            trailing: Icon(Icons.chevron_right),
            onTap: ()=>Navigator.of(context).push(MaterialPageRoute(builder: (_)=>DefaultControllerExampleScreen())),
          ),
          ListTile(
            title: Text("DefaultSocialTextFieldController with above detection field example (NEW!)"),
            subtitle: Text("Editable Text field implementations with above detection field for places like chat pages"),
            trailing: Icon(Icons.chevron_right),
            onTap: ()=>Navigator.of(context).push(MaterialPageRoute(builder: (_)=>DefaultControllerAboveExampleScreen())),
          ),
          ListTile(
            title: Text("SocialTextSpanBuilder Bottom Sheet Example"),
            subtitle: Text("A Different Approach for default controller"),
            trailing: Icon(Icons.chevron_right),
            onTap: ()=>Navigator.of(context).push(MaterialPageRoute(builder: (_)=>BottomSheetControllerExampleScreen())),
          ),
          ListTile(
            title: Text("SocialTextSpanBuilder Example"),
            subtitle: Text("For rendering detections inside RichTextField"),
            trailing: Icon(Icons.chevron_right),
            onTap: ()=>Navigator.of(context).push(MaterialPageRoute(builder: (_)=>SocialTextSpanExampleScreen())),
          ),

        ],
      )// This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
93
likes
150
points
1.14k
downloads

Publisher

unverified uploader

Weekly Downloads

TextEditingController and RichText / TextSpan builder with hashtag, url and mention detection with Regular Expressions. Also with tap support.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on flutter_social_textfield