Skip to content

Commit

Permalink
Added redirection page, sitemap, favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
Tkko committed Feb 24, 2023
1 parent aaa4120 commit 8923b15
Show file tree
Hide file tree
Showing 17 changed files with 201 additions and 161 deletions.
4 changes: 3 additions & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -216,6 +216,7 @@
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand All @@ -230,6 +231,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,7 @@
<true/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
3 changes: 1 addition & 2 deletions example/lib/demo/demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ class AppView extends StatelessWidget {
),
);

final shortestSide =
min(constraints.maxWidth.abs(), constraints.maxHeight.abs());
final shortestSide = min(constraints.maxWidth.abs(), constraints.maxHeight.abs());

if (shortestSide > 600) {
return Container(
Expand Down
6 changes: 2 additions & 4 deletions example/lib/demo/models/models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ class DismissiblePageModel {
double maxTransformValue = .5;
double dragSensitivity = .7;
Color backgroundColor = Colors.black;
DismissiblePageDismissDirection direction =
DismissiblePageDismissDirection.vertical;
Map<DismissiblePageDismissDirection, double> dismissThresholds =
const <DismissiblePageDismissDirection, double>{};
DismissiblePageDismissDirection direction = DismissiblePageDismissDirection.vertical;
Map<DismissiblePageDismissDirection, double> dismissThresholds = const <DismissiblePageDismissDirection, double>{};
DragStartBehavior dragStartBehavior = DragStartBehavior.down;
Duration reverseDuration = const Duration(milliseconds: 200);
HitTestBehavior behavior = HitTestBehavior.opaque;
Expand Down
19 changes: 6 additions & 13 deletions example/lib/demo/pages/dismissible_page_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,12 @@ class _PropertiesState extends State<Properties> {
Title('Bool Parameters'),
Wrap(spacing: 10, runSpacing: 10, children: [
AppChip(
onSelected: () => setState(() =>
pageModel.isFullScreen = !pageModel.isFullScreen),
onSelected: () => setState(() => pageModel.isFullScreen = !pageModel.isFullScreen),
isSelected: pageModel.isFullScreen,
title: 'isFullscreen',
),
AppChip(
onSelected: () => setState(
() => pageModel.disabled = !pageModel.disabled),
onSelected: () => setState(() => pageModel.disabled = !pageModel.disabled),
isSelected: pageModel.disabled,
title: 'disabled',
),
Expand All @@ -106,15 +104,13 @@ class _PropertiesState extends State<Properties> {
Wrap(
spacing: 10,
runSpacing: 10,
children:
DismissiblePageDismissDirection.values.map((item) {
children: DismissiblePageDismissDirection.values.map((item) {
return AppChip(
onSelected: () {
setState(() => pageModel.direction = item);
},
isSelected: item == pageModel.direction,
title: '$item'.replaceAll(
'DismissiblePageDismissDirection.', ''),
title: '$item'.replaceAll('DismissiblePageDismissDirection.', ''),
);
}).toList(),
),
Expand All @@ -131,8 +127,7 @@ class _PropertiesState extends State<Properties> {
title: 'Reverse Transition Duration',
duration: pageModel.reverseTransitionDuration,
onChanged: (value) {
setState(
() => pageModel.reverseTransitionDuration = value);
setState(() => pageModel.reverseTransitionDuration = value);
},
),
SizedBox(height: 30),
Expand Down Expand Up @@ -228,9 +223,7 @@ class LargeImages extends StatelessWidget {
return LargeImageItem(
imagePath: entry.value,
pageModel: pageModel,
scrollPhysics: entry.key.isOdd
? ClampingScrollPhysics()
: BouncingScrollPhysics(),
scrollPhysics: entry.key.isOdd ? ClampingScrollPhysics() : BouncingScrollPhysics(),
);
}),
SizedBox(height: 100),
Expand Down
3 changes: 1 addition & 2 deletions example/lib/demo/pages/stories_wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class StoriesWrapper extends StatefulWidget {
_StoriesWrapperState createState() => _StoriesWrapperState();
}

class _StoriesWrapperState extends State<StoriesWrapper>
with TickerProviderStateMixin {
class _StoriesWrapperState extends State<StoriesWrapper> with TickerProviderStateMixin {
late int dWidth;
late PageController pageCtrl;

Expand Down
4 changes: 1 addition & 3 deletions example/lib/demo/widgets/widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ class _StoryImageState extends State<StoryImage> {
});
},
fit: BoxFit.cover,
image: hasError
? AssetImage(widget.story.altUrl)
: NetworkImage(imageUrl) as ImageProvider,
image: hasError ? AssetImage(widget.story.altUrl) : NetworkImage(imageUrl) as ImageProvider,
),
),
child: Text(
Expand Down
6 changes: 6 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ class SecondPage extends StatelessWidget {
maxTransformValue: .8,
direction: DismissiblePageDismissDirection.multi,
backgroundColor: Colors.black,
onDragStart: (){
print('onDragStart');
},
onDragUpdate: (details){
print(details);
},
dismissThresholds: {
DismissiblePageDismissDirection.vertical: .2,
},
Expand Down
Loading

0 comments on commit 8923b15

Please sign in to comment.