live_text 0.0.1 copy "live_text: ^0.0.1" to clipboard
live_text: ^0.0.1 copied to clipboard

A flutter package that provides easiest way to update text widget in UI.

example/lib/main.dart

import 'package:example/counter_example.dart';
import 'package:example/example_enum.dart';
import 'package:example/timer_example.dart';
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Live Text Example',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: MyHomePage(
        exampleType: ExampleEnum.timer,
      ),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({super.key, required this.exampleType});

  ExampleEnum exampleType;

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return widget.exampleType == ExampleEnum.counter
        ? CounterExample()
        : TimerExample();
  }
}
26
likes
0
pub points
0%
popularity

Publisher

verified publisherthearesmedia.com

A flutter package that provides easiest way to update text widget in UI.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on live_text