This file contains hidden or 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
| /** | |
| * Zlib decompress a file and return its contents | |
| * | |
| * @param filePath absolute path to file | |
| * @return unzipped file contents | |
| */ | |
| fun decompress(filePath: String) : String { | |
| val content = File(filePath).readBytes() | |
| val inflater = Inflater() | |
| val outputStream = ByteArrayOutputStream() |
This file contains hidden or 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
| // ListView applies a tight constraint (minHeight = maxHeight in this case) to its children. | |
| // So all children are forced to have the same height. To let an item to have its own size, | |
| // first, remove constraints by using UnconstrainedBox. | |
| // then, apply new loosen constraints with ConstrainedBox. | |
| // Using only UnconstrainedBox would be sufficient in this specific case, | |
| // but it can cause errors in case the child want to be as big as possible. | |
| // So ConstrainedBox is needed to provide a specific constraints. | |
| ListView( | |
| scrollDirection: Axis.horizontal, |
This file contains hidden or 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
| meta: | |
| title: The Lost Adventure | |
| description: A magical bedtime story about a curious boy who learns the value of courage and wisdom. | |
| author: Lily | |
| version: 1.1.0 | |
| items: | |
| - id: flashlight | |
| name: Shimmering Lantern | |
| description: A tiny lantern that glows with a soft golden light. Helpful in the dark. |
OlderNewer