GitHub 儲存庫sabikrahat/timer_snackbar

timer_snackbar

一個全新的 Flutter 套件,幫助開發者在其 Flutter 應用中加入漂亮的即時計時器至 Snackbar。

timer_snackbar 專案封面
星標
4
分支
3
最近推送(UTC)
2021年10月23日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

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
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
語言C++CMakeDartHTMLCSwiftJavaObjective-C

分類

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項

  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}
  • flutter_lints開發依賴^1.0.0

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

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

GitHub Docs — About repositories ↗