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/rendering.dart'; | |
import 'package:flutter/widgets.dart'; | |
/// Signature for a function that creates a [TileSize] for a given index. | |
typedef TileSize IndexedTileSizeBuilder(int index); | |
/// Creates grid layouts with a fixed number of spans in the cross axis. |
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'; | |
import 'package:flutter/widgets.dart'; | |
import 'package:flutter_sticky_header/flutter_sticky_header.dart'; | |
class _Page { | |
const _Page( | |
this.id, | |
this.title, | |
this.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
typedef VoidCallback = void Function(); | |
class ChangeNotifier { | |
List<VoidCallback> _listeners = List<VoidCallback>(); | |
List<int> _toRemove = List<int>(); | |
bool _notifying = false; | |
bool get hasListeners { | |
return _listeners.isNotEmpty; | |
} |
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
typedef VoidCallback = void Function(); | |
class _Listener { | |
_Listener(this.func); | |
final VoidCallback func; | |
VoidCallback afterNotify; | |
void call() { | |
if (afterNotify == null) { | |
func(); | |
} |
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 RenderSliverGap extends RenderSliver { | |
RenderSliverGap({ | |
double mainAxisExtent, | |
}) : _mainAxisExtent = mainAxisExtent; | |
double get mainAxisExtent => _mainAxisExtent; | |
double _mainAxisExtent; | |
set mainAxisExtent(double value) { | |
if (_mainAxisExtent != value) { | |
_mainAxisExtent = value; |
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
const SliverGeometry({ | |
this.scrollExtent = 0.0, | |
this.paintExtent = 0.0, | |
this.paintOrigin = 0.0, | |
double layoutExtent, | |
this.maxPaintExtent = 0.0, | |
this.maxScrollObstructionExtent = 0.0, | |
double hitTestExtent, | |
bool visible, | |
this.hasVisualOverflow = false, |
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
const SliverConstraints({ | |
@required this.axisDirection, | |
@required this.growthDirection, | |
@required this.userScrollDirection, | |
@required this.scrollOffset, | |
@required this.precedingScrollExtent, | |
@required this.overlap, | |
@required this.remainingPaintExtent, | |
@required this.crossAxisExtent, | |
@required this.crossAxisDirection, |
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 Gap extends LeafRenderObjectWidget { | |
const Gap( | |
this.mainAxisExtent, { | |
Key key, | |
}) : assert(mainAxisExtent != null && | |
mainAxisExtent >= 0 && | |
mainAxisExtent < double.infinity), | |
super(key: key); | |
final double mainAxisExtent; |
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 _RenderGap extends RenderBox { | |
_RenderGap({ | |
double mainAxisExtent, | |
}) : _mainAxisExtent = mainAxisExtent; | |
double get mainAxisExtent => _mainAxisExtent; | |
double _mainAxisExtent; | |
set mainAxisExtent(double value) { | |
if (_mainAxisExtent != value) { | |
_mainAxisExtent = value; |
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 Gap extends LeafRenderObjectWidget { | |
const Gap( | |
this.mainAxisExtent, { | |
Key key, | |
}) : assert(mainAxisExtent != null && | |
mainAxisExtent >= 0 && | |
mainAxisExtent < double.infinity), | |
super(key: key); | |
final double mainAxisExtent; |
NewerOlder