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/rendering.dart'; | |
class Destination { | |
const Destination(this.title, this.icon, this.color); | |
final String title; | |
final IconData icon; | |
final MaterialColor color; | |
} |
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
// PinnedHeaderSliver demo | |
// https://github.com/flutter/flutter/pull/143196 | |
import 'dart:math' as math; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
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
// 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
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
// 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, |
NewerOlder