Skip to content

Instantly share code, notes, and snippets.

View bizz84's full-sized avatar

Andrea Bizzotto bizz84

View GitHub Profile
@bizz84
bizz84 / privacy-manifest-list.txt
Created March 27, 2024 12:18
Bash script to check if the Podfile.lock contains any SDKs that should be declared in the privacy manifest file
Abseil
AFNetworking
Alamofire
AppAuth
BoringSSL / openssl_grpc
Capacitor
Charts
connectivity_plus
Cordova
device_info_plus
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
@bizz84
bizz84 / scroll_to_index_dynamic_height.dart
Created January 14, 2024 10:22
Example showing how to scroll to a list item by index when all items can have different heights
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:scroll_to_index/scroll_to_index.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
@bizz84
bizz84 / find-flutter-logo-page-flip.dart
Created December 11, 2023 14:18
A game where the player needs to find out under which card the Flutter logo is hiding.
import 'dart:math';
import 'package:flutter/material.dart';
// To use this package, run:
// dart pub add page_flip_builder
import 'package:page_flip_builder/page_flip_builder.dart';
void main() {
runApp(const MyApp());
}
@bizz84
bizz84 / macOS-Podfile
Last active October 5, 2023 01:42
macOS Podfile template for Flutter apps
# Set the platform at the top
platform :osx, '10.15'
# Rest of the pod file
# Update post_install step
post_install do |installer|
# Ensure pods use the minimum deployment target set above
# https://stackoverflow.com/a/64385584/436422
pods_project = installer.pods_project
@bizz84
bizz84 / iOS-Podfile
Last active October 12, 2023 08:40
iOS Podfile template for Flutter apps
# Set the platform at the top
platform :ios, '13.0'
# Rest of the pod file
# Update post_install step
post_install do |installer|
# Ensure pods use the minimum deployment target set above
# https://stackoverflow.com/a/64385584/436422
pods_project = installer.pods_project
0 verbose cli /usr/local/bin/firebase /snapshot/firepit/node_modules/npm/bin/npm-cli
1 info using npm@8.19.4
2 info using node@v16.16.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 3ms
5 timing config:load:file:/snapshot/firepit/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/Users/andrea/work/codewithandrea/flutter-firebase-masterclass/complete-flutter-course-scratch/ecommerce_app/functions/.npmrc Completed in 1ms
@bizz84
bizz84 / flutter_safe_area_test.dart
Last active May 13, 2023 20:34
Simple SafeArea demo
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@bizz84
bizz84 / main.dart
Last active May 5, 2023 15:53
Simple Emil & Password auth flow with Flutter & Firebase UI
import 'package:firebase_auth/firebase_auth.dart' hide EmailAuthProvider;
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_ui_auth/firebase_ui_auth.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:simple_auth_flutter_firebase_ui/firebase_options.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
@bizz84
bizz84 / sliver_aligned_grid_bug.dart
Created January 12, 2023 10:42
SliverAlignedGrid bottom overflow bug when loading a CachedNetworkImage
// Note: this example needs the flutter_staggered_grid_view and cached_network_image packages to run correctly.
import 'dart:math';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
void main() {
runApp(const MyApp());