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'; | |
import 'package:flutter/scheduler.dart'; | |
void main() { | |
runApp(const ThumbDragApp()); | |
} | |
class ThumbDragApp extends StatelessWidget { | |
const ThumbDragApp({ super.key }); |
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
// 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'; | |
import 'package:flutter/scheduler.dart'; | |
/// Flutter code sample for [ScrollEndNotification]. | |
void main() { |
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
// Allow arbitrary foreground and background elements for ButtonStyle | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MaterialApp(home: Home())); | |
} | |
class Home extends StatefulWidget { | |
const Home({ super.key }); |
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'; | |
// Occupies the same width as the widest single digit used by AnimatedDigit. | |
class _PlaceholderDigit extends StatelessWidget { | |
const _PlaceholderDigit(); | |
@override | |
Widget build(BuildContext context) { | |
final TextStyle textStyle = Theme.of(context).textTheme.displayLarge!.copyWith( | |
fontWeight: FontWeight.w500, |
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 Adaptation<T> { | |
const Adaptation(); | |
Type get type => T; | |
T adapt(ThemeData theme, T defaultValue) => defaultValue; | |
} | |
class ThemeData { | |
factory ThemeData({ Iterable<Adaptation>? adaptations }) { | |
return ThemeData.raw( | |
adaptationMap: <Type, Adaptation>{ |
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'; | |
/// Animated text widget that will animate changes in [temperature] to match | |
/// the effect on the new thermostats. | |
class AnimatedTemperatureText extends StatefulWidget { | |
final int temperature; | |
final Color textColor; | |
const AnimatedTemperatureText({ | |
super.key, |
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' as math; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
class Item extends StatelessWidget { | |
const Item({ super.key, required this.title, required this.color }); |
NewerOlder