-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from aman-singh7/ib_showcase
ShowCaseView on Interactive Book
- Loading branch information
Showing
11 changed files
with
354 additions
and
50 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import 'dart:convert'; | ||
|
||
import 'package:flutter/material.dart'; | ||
|
||
class IBShowCase { | ||
bool nextButton, prevButton, tocButton, drawerButton; | ||
|
||
IBShowCase({ | ||
@required this.nextButton, | ||
@required this.prevButton, | ||
@required this.tocButton, | ||
@required this.drawerButton, | ||
}); | ||
|
||
factory IBShowCase.fromJson(Map<String, dynamic> json) { | ||
return IBShowCase( | ||
nextButton: json['next'] ?? false, | ||
prevButton: json['prev'] ?? false, | ||
tocButton: json['toc'] ?? false, | ||
drawerButton: json['drawer'] ?? false, | ||
); | ||
} | ||
|
||
IBShowCase copyWith({ | ||
bool nextButton, | ||
bool prevButton, | ||
bool tocButton, | ||
bool drawerButton, | ||
}) { | ||
return IBShowCase( | ||
nextButton: nextButton ?? this.nextButton, | ||
prevButton: prevButton ?? this.prevButton, | ||
tocButton: tocButton ?? this.tocButton, | ||
drawerButton: drawerButton ?? this.drawerButton, | ||
); | ||
} | ||
|
||
@override | ||
String toString() { | ||
return json.encode({ | ||
'next': nextButton, | ||
'prev': prevButton, | ||
'toc': tocButton, | ||
'drawer': drawerButton, | ||
}); | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.