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
#!/bin/bash | |
# Update Gradle, Java and other Android project settings in a Flutter project | |
# See: https://gradle.org/releases/ | |
DESIRED_GRADLE_VERSION="8.9" | |
# Build errors often show the required Java version | |
DESIRED_JAVA_VERSION="17" | |
# See: https://developer.android.com/ndk/downloads | |
DESIRED_NDK_VERSION="27.0.12077973" | |
# The minimum Android SDK version |
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
Como ir de $0 a $10k/mês (por Josh Rush https://x.com/johnrushx/status/1838342060857770336) | |
1. Ideia. | |
○ fácil de construir (idealmente sem código (nocode)) | |
○ pode ser explicada em uma frase | |
○ direcionada a um pequeno nicho B2B (business to business) | |
○ tem potencial de crescimento orgânico | |
Nunca pense: "Vou comprar anúncios para promovê-la". Isso literalmente nunca funciona. |
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
# This is a basic workflow to help you get started with Actions | |
name: CD | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
tags: | |
- "v*.*.*" # on every version tag will build a new android artifact. | |
jobs: |
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 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'dart:math' as math; | |
class SliverGridPage extends StatefulWidget { | |
@override | |
_SliverGridPageState createState() => _SliverGridPageState(); | |
} | |
class _SliverGridPageState extends State<SliverGridPage> { |
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
abstract class EventSyncHelper { | |
void startSession(); | |
Future<void> sendEvent(Event event); | |
Future<VoidResult> syncRemainingEvents(); | |
void endSession(); | |
} |
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 'package:flutter/material.dart'; | |
import '../extensions/extensions.dart'; | |
typedef AnimatedGridBuilder<T> = Widget Function( | |
BuildContext, T item, AnimatedGridDetails details); | |
class AnimatedGrid<T> extends StatelessWidget { | |
/// An animated grid the animates when the items change sort. | |
const AnimatedGrid({ |
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 'dart:async'; | |
import 'package:firebase_database/firebase_database.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
void main() { | |
WidgetsFlutterBinding.ensureInitialized(); | |
SystemChrome.setPreferredOrientations([ | |
DeviceOrientation.portraitUp, |
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 'dart:math' as math; | |
const String _kPushChars = '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz'; | |
typedef String StringCallback(); | |
StringCallback generatePushId = () { | |
int lastPushTime = 0; | |
final List<int> randomSuffix = new List<int>(12); | |
final math.Random random = new math.Random.secure(); |
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 'package:flutter_hooks/flutter_hooks.dart'; | |
import 'package:state_notifier/state_notifier.dart'; | |
T useStateNotifier<T>(StateNotifier<T> notifier) { | |
final state = useState<T>(null); | |
useEffect(() { | |
return notifier.addListener((s) => state.value = s); | |
}, [notifier]); |
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 'package:cloud_firestore/cloud_firestore.dart'; | |
class MockFirestore extends Mock implements FirebaseFirestore {} | |
class MockCollectionReference extends Mock implements CollectionReference {} | |
class MockDocumentReference extends Mock implements DocumentReference {} | |
class MockDocumentSnapshot extends Mock implements DocumentSnapshot {} |
NewerOlder