url_textformfield 1.0.0 copy "url_textformfield: ^1.0.0" to clipboard
url_textformfield: ^1.0.0 copied to clipboard

Textformfield designed for inputing urls, with options to add leading and trailing text, appended at begining and end of input

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Url TextFormField Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final FocusNode ctrlFocusNode = FocusNode();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Url TextFormField Example'),
      ),
      body: Column(
        children: [
          const SizedBox(height: 70),
          UrlTextFormField(
            focusNode: ctrlFocusNode,
            padding: const EdgeInsets.all(10),
            onChanged: (val) {},
            leadingText: 'https://',
            trailingText: ".com",
          )
        ],
      ),
    );
  }
}
1
likes
150
pub points
4%
popularity

Publisher

verified publishersivaprasadnk.dev

Textformfield designed for inputing urls, with options to add leading and trailing text, appended at begining and end of input

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on url_textformfield