Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Flutter Lifecycle

slime-a777
October 17, 2018

Flutter Lifecycle

slime-a777

October 17, 2018
Tweet

More Decks by slime-a777

Other Decks in Programming

Transcript

  1. ֬ೝํ๏ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver { @override void

    didChangeAppLifecycleState(AppLifecycleState state) { print('*** state = ${state.toString()}'); } @override void initState() { super.initState(); WidgetsBinding.instance.addObserver(this); } @override void dispose() { super.dispose(); WidgetsBinding.instance.removeObserver(this); }
  2. MJGFDZDMFͷύλʔϯ w JOBDUJWF w ΞϓϦ͕ඇΞΫςΟϒͰ͋ΓɺϢʔβͷೖྗΛड͚෇͚ͳ͍ঢ়ଶ w ΞϓϦΛόοΫάϥ΢ϯυʹҠߦͨ͠Γɺి࿩ʹԠ౴ͨ͠ΓɺΞ ϓϦΛ੾Γସ͑ͨΓ͍ͯ͠Δ్தஈ֊ʹ͓͍ͯ͜ͷঢ়ଶʹҠߦ͢ Δ w

    "OESPJEͷMJGFDZDMFʹ͸JOBDUJWFʹ֘౰͢Δঢ়ଶ͸ͳ͍ w QBVTFE w ΞϓϦέʔγϣϯͷҰ࣌ఀࢭঢ়ଶɻϢʔβͷೖྗʹԠ౴ͤͣɺόο Ϋάϥ΢ϯυͰ࣮ߦ͞ΕΔ