Skip to content

Instantly share code, notes, and snippets.

View HelloCore's full-sized avatar

Core HelloCore

  • Bangkok, Thailand
View GitHub Profile
@HelloCore
HelloCore / global_context.dart
Created August 11, 2022 04:16
GlobalContext2
// This code is distributed under the MIT License.
// Copyright (c) 2018 Felix Angelov.
// You can find the original at https://github.com/felangel/bloc.
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
void main() {
BlocOverrides.runZoned(
() => runApp(const App()),
@HelloCore
HelloCore / global_context.dart
Created August 11, 2022 04:12
GlobalContext
// This code is distributed under the MIT License.
// Copyright (c) 2018 Felix Angelov.
// You can find the original at https://github.com/felangel/bloc.
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
void main() {
BlocOverrides.runZoned(
() => runApp(const App()),
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@import Foundation;
@class UIImage;
NS_ASSUME_NONNULL_BEGIN
import 'dart:io';
import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/visitor.dart';
import 'package:danger_core/danger_core.dart';
import 'package:path/path.dart' as path;
enum _AnalysisVisitorType {
listenWithoutAddTo,
@HelloCore
HelloCore / danger_report_wip_github.dart
Created August 17, 2021 14:54
Danger Plugin Label WIP
import 'package:danger_core/danger_core.dart';
import 'package:github/github.dart';
const LABEL_NAME = 'Work in Progress';
class DangerReportWIPGithub {
static Future<void> process() async {
if (danger.github != null) {
final token = danger.settings.github.accessToken;
final github = GitHub(auth: Authentication.withToken(token));
@HelloCore
HelloCore / danger_codecoverage_report.dart
Created August 17, 2021 14:53
Danger Plugin Code Coverage Report Github
import 'dart:io';
import 'package:danger_core/danger_core.dart';
import 'package:lcov_dart/lcov_dart.dart';
class _CodeCovReport {
final String fileName;
final String filePath;
final String rawFilePath;
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
class Person {
final String? firstName;
Person(this.firstName);
}
void main() {
String x = "1";
var person = Person("hello");
if(person.firstName != null) {
class Person {
final String? firstName;
Person(this.firstName);
}
void main() {
String x = "1";
var person = Person("hello");
if(person.firstName != null) {
import 'package:fizz_buzz_golden/fizz_buzz_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:golden_toolkit/golden_toolkit.dart';
void main() {
group('fizz_buzz_page', () {
Widget page;
setUp(() {
page = FizzBuzzPage();