Skip to content

Instantly share code, notes, and snippets.

Hans Muller HansMuller

View GitHub Profile
View thb_fail.dart
// 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 'package:flutter/material.dart';
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
View overflow_bar_demo.dart
// A demo of the OverflowBar widget. Resize DartPad's browser window to see the overflow layout.
//
// Uses the old button classes because DartPad.
// @dart = 2.8
import 'dart:math' as math;
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
View scroll_fade_demo.dart
import 'package:flutter/material.dart';
class DemoShader extends StatefulWidget {
const DemoShader({ Key key, this.child }) : super(key: key);
final Widget child;
@override
_DemoShaderState createState() => _DemoShaderState();
}
View app_es.arb
{
"@@locale": "es",
"helloWorld": "Hola Mundo!"
}
View sample_l10n_pubspec.yaml
name: l10n_new_arb
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
View app_en.arb
{
"@@locale": "en",
"helloWorld": "Hello World!",
"@helloWorld": {
"description": "The conventional newborn programmer greeting"
}
}
View l10n_sample.dart
import 'package:flutter/material.dart';
import 'l10n/app_localizations.dart'; // L10N
class AppLocale extends StatelessWidget {
const AppLocale({ Key key, this.locale, this.child }) : super(key: key);
final Locale locale;
final Widget child;
View l10n.yaml
# Options used by the localizations tool
## The directory where locale-specific ".arb" message catalog files can
## be found. The output directory will match the input directory if the
#W# `output-directory` option is not specified.
arb-dir: lib/l10n
## Names the template arb file that will be used to check and validate the
## remaining arb files when generating `output-class` and its supporting
## classes.
View flutter_buttons_demo_v2.dart
// 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.
// For more information see "Updating the Material Buttons and their Themes #54776"
// https://github.com/flutter/flutter/issues/54776
import 'dart:math' as math;
import 'dart:ui' show lerpDouble;
View flutter_buttons_demo_v1.dart
// 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.
// For more information see "Updating the Material Buttons and their Themes #54776"
// https://github.com/flutter/flutter/issues/54776
import 'dart:math' as math;
import 'dart:ui' show lerpDouble;
You can’t perform that action at this time.