Skip to content

Instantly share code, notes, and snippets.

@alectogeek
alectogeek / main.dart
Last active Dec 7, 2021
Мат ожидание
View main.dart
import 'dart:math';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
@alectogeek
alectogeek / main.dart
Last active Jun 17, 2021
Crypto response parsing
View main.dart
import 'dart:convert';
void main() {
String response = '''{
"status": {
"timestamp": "2021-06-17T05:09:56.181Z",
"error_code": 0,
"error_message": null,
"elapsed": 13,
View video camera example
import 'dart:async';
import 'dart:io';
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
import 'package:video_player/video_player.dart';
import 'package:fluttertoast/fluttertoast.dart';
class VideoRecorderExample extends StatefulWidget {
View FirebaseRemoteConfig
FIRRemoteConfig *remoteConfig = [FIRRemoteConfig remoteConfig];
long expiration = (long)call.arguments[@"expiration"];
[remoteConfig
fetchWithExpirationDuration:expiration
completionHandler:^(FIRRemoteConfigFetchStatus status, NSError *error) {
NSNumber *lastFetchTime = [[NSNumber alloc]
initWithLong:(long)[[remoteConfig lastFetchTime] timeIntervalSince1970] *
1000];
NSString *lastFetchStatus =
View AppDelegate.swift
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
View main.dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(CupertinoApp(home: DishPage()));
}
class DishPage extends StatefulWidget {
const DishPage({Key key}) : super(key: key);