This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Flutter | |
| import React | |
| import UIKit | |
| @UIApplicationMain | |
| @objc class AppDelegate: FlutterAppDelegate { | |
| override func application( | |
| _ application: UIApplication, | |
| didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? | |
| ) -> Bool { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useEffect } from 'react' | |
| export class Timer { | |
| name: string | |
| lastTimestamp = 0 | |
| counts = new Map<string, number>() | |
| durations = new Map<string, number>() | |
| totalDuration = 0 | |
| totalCount = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Returns the latest value of given prop as a ref. | |
| * | |
| * This function allows treating given prop as a non-reactive value, that should be | |
| * accessible in `useEffect` but does not trigger effect re-run. | |
| * | |
| * @param value - The prop value to be used as a ref | |
| * @returns A ref that will always hold the latest value of the prop | |
| */ | |
| function useLatestPropRef<T>(value: T) { |
OlderNewer