Skip to content

Instantly share code, notes, and snippets.

View fredgrott's full-sized avatar
👾
focusing on flutter cross platform mobile dev

Fred Grott fredgrott

👾
focusing on flutter cross platform mobile dev
View GitHub Profile
TheHopesPoem
Hopes,
dashed in the gun hands
of a mentally-ill dissenter
lady liberty gazed upon Florida
and creid at teh Februrary
bitter and cold in its death grip
@fredgrott
fredgrott / gitignore.txt
Created August 31, 2018 14:06
Gitignore config for git Android Studio projects
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
#local properties
local.properties
@fredgrott
fredgrott / SubscribersExt.kt
Created November 5, 2018 13:44
better way to log RxJava without the callstack and only appears in debug logs
/* Copyright 2018 Fred Grott
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@fredgrott
fredgrott / keybase.md
Created March 5, 2020 11:59
keybase proof

Keybase proof

I hereby claim:

  • I am fredgrott on github.
  • I am fredgrott (https://keybase.io/fredgrott) on keybase.
  • I have a public key whose fingerprint is B2F2 0535 43DC 4FD2 ED45 272D 4DCE 5BB1 58BC EAA1

To claim this, I am signing this object:

@fredgrott
fredgrott / flutter_test_config.dart
Created February 13, 2021 18:06
flutter test config
import 'dart:async';
import 'package:golden_toolkit/golden_toolkit.dart';
Future<void> main(FutureOr<void> Function() testMain) async {
return GoldenToolkit.runWithConfiguration(
() async {
await loadAppFonts();
await testMain();
@fredgrott
fredgrott / golden_widget_test.dart
Created February 13, 2021 18:09
golden widget test
import 'package:flutter_test/flutter_test.dart';
import 'package:golden_toolkit/golden_toolkit.dart';
import 'package:karma/main.dart';
void main() {
group('Basic Golden Tests ', () {
testWidgets('Golden test', (WidgetTester tester) async {
await tester.pumpWidget(MyApp());
await expectLater(find.byType(MyApp), matchesGoldenFile('main.png'));
});
@fredgrott
fredgrott / my_home_page_test.dart
Created February 13, 2021 18:12
my home page test
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:golden_toolkit/golden_toolkit.dart';
import 'package:karma/main.dart';
// ignore: long-method
void main() {
testGoldens('DeviceBuilder - one scenario - default devices', (tester) async {
final builder = DeviceBuilder()
..addScenario(
@fredgrott
fredgrott / dartdoc_options_base.yaml
Created February 16, 2021 17:30
dartdoc options yaml file base
# This file is used by dartdoc when generating API documentation for Flutter.
dartdoc:
# Before you can run dartdoc, the snippets tool needs to have a snapshot built.
# The dev/tools/dartdoc.dart script does this automatically.
errors:
# Default errors of dartdoc:
- duplicate-file
- invalid-parameter
- no-defining-library-found
@fredgrott
fredgrott / lcov.info
Created February 25, 2021 13:04
lcov.info example
SF:lib\main.dart
DA:3,0
DA:4,0
DA:9,2
DA:11,2
DA:13,2
DA:27,2
DA:35,0
DA:48,3
DA:49,3
@fredgrott
fredgrott / flutter_setup-test.xml
Created February 25, 2021 13:13
flutter test xml report example
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite errors="0" failures="0" tests="2" skipped="0" name="D:.fredgrttsstuff.ForkProjects.flutter_setup.test.app_title" timestamp="2021-02-24T20:52:39">
<properties>
<property name="platform" value="vm"/>
</properties>
<testcase classname="D:.fredgrttsstuff.ForkProjects.flutter_setup.test.app_title" name="Basic App Chrome Title test Specified title and color are used to build a Title" time="0.473"/>
<testcase classname="D:.fredgrttsstuff.ForkProjects.flutter_setup.test.app_title" name="Basic App Chrome Title test onGenerateTitle handles changing locales" time="0.063"/>
</testsuite>
<testsuite errors="0" failures="0" tests="2" skipped="0" name="D:.fredgrttsstuff.ForkProjects.flutter_setup.test.golden_widget" timestamp="2021-02-24T20:52:39">