flutter_phoenix
간편하게 애플리케이션을 처음부터 다시 시작하세요.
- 스타
- 156
- 포크
- 20
- 최근 푸시(UTC)
- 2023. 11. 20.
- 프로젝트 상태
- 활성
원본 README
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Flutter Phoenix
Easily restart your application from scratch, losing any previous state.
Flutter 3.0
From 1.1.0 and onwards, flutter_phoenix is targeting SDK 2.17.0 minimum. If you want to keep using flutter_phoenix but cannot migrate to Dart SDK 2.17.0 yet, use the version 1.0.0 instead.
Flutter 2.0 and null-safety
From 1.0.0 and onwards, flutter_phoenix is null-safe and requires Dart SDK 2.12.0 minimum.
If you want to keep using flutter_phoenix but cannot migrate to null-safety yet, use the version 0.1.0 instead.
Usage
Wrap you App widget in the Phoenix widget.
void main() {
runApp(
Phoenix(
child: App(),
),
);
}
Call the rebirth static method when you want to restart your application (rebuild the entire widget tree from scratch).
Phoenix.rebirth(context);
Disclaimer :
Phoenix restarts your application at the application level, rebuilding your application widget tree from scratch, losing any previous state.
Phoenix does not fully restart your application process at the OS level.
Use cases
Here is a non-exhaustive list of use cases where Phoenix can help :
- restart the app after a logout
- restart the app after a failed app initialization process
- restart the app after a specific event in the app occurs
- ...
Installation
Dependency
Add the package as a dependency in your pubspec.yaml file.
dependencies:
flutter_phoenix: "^1.0.0"
Import
Import the package in your code file.
import 'package:flutter_phoenix/flutter_phoenix.dart';
License
Flutter Phoenix is released under the MIT License
Credit
This package is an extract of @rrousselGit answer on this stackoverflow post
About us
As of July 2022, this package is maintained by the front team working on the french mobile application Dailyn
사용 중인 의존성
의존성 목록 2 개
- flutter
{"sdk":"flutter"} - flutter_test개발 의존성
{"sdk":"flutter"}
프로젝트에 맞는 저장소를 선택하려면?
사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
- 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
- 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
- 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.
출처 및 관리
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗