Repositório GitHubsabikrahat/timer_snackbar

timer_snackbar

Um novo pacote Flutter que ajuda os desenvolvedores a adicionar um temporizador ao vivo bonito ao Snackbar do seu aplicativo Flutter.

Capa do projeto timer_snackbar
Estrelas
4
Forks
3
Último push (UTC)
23 de out. de 2021
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Timer Snackbar

Timer Snackbar package let you to add a beautiful live timer at snackbar to your Flutter app.

Installation

  1. Add the latest version of package to your pubspec.yaml (and rundart pub get):
dependencies:
  timer_snackbar: ^0.0.3
  1. Import the package and use it in your Flutter App.
import 'package:timer_snackbar/timer_snackbar.dart';

Preview

Preview



Example

There are a number of properties that you can modify:

  • context
  • contentText
  • buttonPrefixWidget
  • buttonLabel
  • afterExecuteMethod
  • second
  • backgroundColor
  • contentTextStyle

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Timer Snackbar"),
      ),
      body: Center(
        child: ElevatedButton(
          child: const Padding(
              padding: EdgeInsets.all(8.0),
              child: Text('Show Snackbar', textScaleFactor: 1.2)),
          style: ElevatedButton.styleFrom(
              shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(8.0))),
          onPressed: () => timerSnackbar(
            context: context,
            contentText: "A snackbar with live timer.",
            buttonPrefixWidget: Image.asset(
              'assets/undo.png',
              width: 17.0,
              height: 15.0,
              alignment: Alignment.topCenter,
              color: Colors.blue[100],
            ),
            afterTimeExecute: () => print("Operation Execute."),
            second: 5,
          ),
        ),
      ),
    );
  }
}
Md. Sabik Alam Rahat GitHub avatar
Autor no GitHub

Md. Sabik Alam Rahat ↗

A self-taught programmer who always tries to learn something new and interesting.

Algoramming | The Flutter Way | TechnethMerul Badda, Anandanagar, Dhaka
LinguagensC++CMakeDartHTMLCSwiftJavaObjective-C

Categorias

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 3 itens

  • flutter{"sdk":"flutter"}
  • flutter_testDesenvolvimento{"sdk":"flutter"}
  • flutter_lintsDesenvolvimento^1.0.0

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗