Skip to content

Instantly share code, notes, and snippets.

View nodahikaru's full-sized avatar
:octocat:
Thinking, Coding, Studying

Noda Hikaru nodahikaru

:octocat:
Thinking, Coding, Studying
View GitHub Profile
@nodahikaru
nodahikaru / BottomSheetCustom.dart
Created August 26, 2019 03:57
Custom height BottomSheet in Flutter
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter/material.dart';
const Duration _kBottomSheetDuration = Duration(milliseconds: 200);
const double _kMinFlingVelocity = 700.0;
const double _kCloseProgressThreshold = 0.5;
@import Photos;
@import AVKit;
[PHPhotoLibrary.sharedPhotoLibrary performChanges:^{
NSURL *url = [NSURL fileURLWithPath:[FileUtil filePath:fileName]];
[PHAssetChangeRequest creationRequestForAssetFromVideoAtFileURL:url];
} completionHandler:^(BOOL success, NSError * _Nullable error) {
if (error) {
NSLog(@"Error : %@", error);