Skip to content

Instantly share code, notes, and snippets.

View renefloor's full-sized avatar

Rene Floor renefloor

View GitHub Profile
@renefloor
renefloor / pubspec.yaml
Last active July 4, 2023 14:08
iap local verification
...
dependencies:
asn1lib: ^1.0.0
...
@renefloor
renefloor / main.dart
Last active April 16, 2021 12:04
Example for null-safety
import 'dart:math';
void foo(Bar bar) {
if(bar.baz == null){
// bar.baz was null
}else{
// You are actually not sure if bar.baz is not null
bar.baz;
}
@renefloor
renefloor / file_service_with_custom_validity.dart
Last active November 20, 2020 08:54
CacheManager FileService with custom validity
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:http/http.dart' as http;
import 'package:clock/clock.dart';
const cacheKey = 'cache';
final cacheManager = CacheManager(Config(
cacheKey,
fileService: CustomFileService(),
));
const validity = Duration(days: 7);
import 'package:flutter/material.dart';
import 'dart:math';
void main() {
runApp(new MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {