This file contains 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
class MyPainter extends CustomPainter { | |
@override | |
void paint(Canvas canvas, Size size) { | |
final brush = Paint() | |
..color = Colors.blue | |
..strokeWidth = 4 | |
..style = PaintingStyle.stroke; | |
canvas.drawVertices( | |
UI.Vertices( |
This file contains 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'; | |
import 'dart:typed_data'; | |
import 'dart:ui' as UI; | |
import 'package:flutter/material.dart'; | |
import 'package:vector_math/vector_math_64.dart' hide Colors; | |
final TargetPlatform platform = TargetPlatform.android; |
This file contains 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'; | |
class MessageShape extends ShapeBorder { | |
const MessageShape({ | |
@required this.target, | |
@required this.borderRadius, | |
@required this.tailHeight, | |
@required this.tailBaseWidth, | |
}); |
This file contains 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:appname/services/firestore.dart'; | |
import 'package:appname/utils/get_status_code_error.dart'; | |
import 'package:firebase_auth/firebase_auth.dart'; | |
import 'package:flutter_facebook_login/flutter_facebook_login.dart'; | |
import 'package:google_sign_in/google_sign_in.dart'; | |
GoogleSignIn _googleSignIn = GoogleSignIn(scopes: ['email']); |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>$(DEVELOPMENT_LANGUAGE)</string> | |
<key>CFBundleExecutable</key> | |
<string>$(EXECUTABLE_NAME)</string> | |
<key>CFBundleIdentifier</key> | |
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
This file contains 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
def localProperties = new Properties() | |
def localPropertiesFile = rootProject.file('local.properties') | |
if (localPropertiesFile.exists()) { | |
localPropertiesFile.withReader('UTF-8') { reader -> | |
localProperties.load(reader) | |
} | |
} | |
def flutterRoot = localProperties.getProperty('flutter.sdk') | |
if (flutterRoot == null) { |
This file contains 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
org.gradle.jvmargs=-Xmx1536M | |
android.useAndroidX=true | |
android.enableJetifier=true | |
android.enableR8=true |
This file contains 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
buildscript { | |
ext.kotlin_version = '1.3.50' | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:3.3.2' | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" |
This file contains 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'; | |
/// This is possibly an issue with the flutter framework where | |
/// when returning a container for FAB, it won't show a | |
/// floating snackbar but it will show a fixed one | |
class FloatingIssue extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
floatingActionButton: Container(), |
This file contains 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:flutter/material.dart'; | |
import 'package:mobile/utils/lifecycle_event_handler.dart'; | |
/// Attaches to a [Widget] and calls [fetchData] every [interval] seconds | |
/// or upon app reactivation. | |
mixin ContinuousRequest<T extends StatefulWidget> on State<T> { | |
/// A subscription that calls [fetch] data every [interval] seconds |