### Install Flutter Dependencies Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Installs the necessary dependencies for the Turnable Page Flutter project. This command should be run after cloning the repository and navigating into the project directory. ```bash flutter pub get ``` -------------------------------- ### Run Turnable Page Example App Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Runs the example application for the Turnable Page project. This allows developers to see the package in action and test its features. It requires navigating to the example directory first. ```bash cd example flutter run ``` -------------------------------- ### Display PDF from File with TurnablePdf Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Demonstrates loading a PDF from a local file path, typically obtained through a file picker, using `TurnablePdf.file`. The example shows how to pass a `File` object and configure the page view mode. ```dart final file = File(pathFromPicker); TurnablePdf.file( file, pageViewMode: PageViewMode.double, ) ``` -------------------------------- ### TurnablePdf File Loading Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Example of how to display a PDF document from a local file path, typically obtained via a file picker. ```APIDOC ## TurnablePdf File Loading ### Description Illustrates how to use the `TurnablePdf.file` constructor to load and display a PDF file from the local file system, such as one selected by the user. ### Method Static factory constructor ### Endpoint N/A ### Parameters N/A ### Request Example ```dart final file = File(pathFromPicker); TurnablePdf.file( file, pageViewMode: PageViewMode.double, ) ``` ### Response N/A #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Install Turnable Page Package Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Add the turnable_page package to your Flutter project's pubspec.yaml file and run 'flutter pub get' to install it. ```yaml dependencies: turnable_page: ^1.0.0 ``` ```bash flutter pub get ``` -------------------------------- ### TurnablePdf Asset Loading Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Example of how to display a PDF document bundled within the application's assets. ```APIDOC ## TurnablePdf Asset Loading ### Description Shows how to use the `TurnablePdf.asset` constructor to load and display a PDF file included in the application's asset bundle. ### Method Static factory constructor ### Endpoint N/A ### Parameters N/A ### Request Example ```dart TurnablePdf.asset( 'assets/docs/book.pdf', pageViewMode: PageViewMode.single, ) ``` ### Response N/A #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### TurnablePage Widget Example in Flutter Source: https://context7.com/saeedahmed725/turnable_page/llms.txt Demonstrates the usage of the TurnablePage widget to display flipbook-style content. It configures page count, view mode, decoration, animation settings, and a custom builder for page content, including interactive widgets. ```dart import 'package:flutter/material.dart'; import 'package:turnable_page/turnable_page.dart'; class BookExample extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( body: Center( child: TurnablePage( pageCount: 8, pageViewMode: PageViewMode.single, paperBoundaryDecoration: PaperBoundaryDecoration.vintage, autoResponseSize: true, settings: FlipSettings( flippingTime: 700, drawShadow: true, swipeDistance: 60.0, cornerTriggerAreaSize: 0.15, ), onPageChanged: (leftPageIndex, rightPageIndex) { print('Current page: $rightPageIndex'); }, builder: (context, pageIndex, constraints) { return Container( decoration: BoxDecoration( gradient: LinearGradient( colors: [Colors.blue.shade300, Colors.blue.shade600], ), ), child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Text( 'Page ${pageIndex + 1}', style: TextStyle(fontSize: 32, color: Colors.white), ), SizedBox(height: 20), ElevatedButton( onPressed: () => print('Button tapped on page $pageIndex'), child: Text('Interactive Button'), ), ], ), ), ); }, ), ), ); } } ``` -------------------------------- ### Display PDFs with TurnablePdf Widget Source: https://context7.com/saeedahmed725/turnable_page/llms.txt Provides examples for using the `TurnablePdf` widget to display PDF documents. It covers loading PDFs from network URLs, local assets, and file paths, along with customization options for page view mode, paper decoration, flip settings, and custom loading/error UIs. ```dart import 'package:flutter/material.dart'; import 'package:turnable_page/turnable_page.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); // Initialize PDF loaders before using TurnablePdf await TurnablePdf.initPDFLoaders(); runApp(MyApp()); } class PdfViewerExample extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( body: Column( children: [ // Load PDF from network URL Expanded( child: TurnablePdf.network( 'https://example.com/document.pdf', pageViewMode: PageViewMode.double, paperBoundaryDecoration: PaperBoundaryDecoration.modern, headers: {'Authorization': 'Bearer token'}, // Optional headers settings: FlipSettings( flippingTime: 800, swipeDistance: 60, cornerTriggerAreaSize: 0.15, ), onPageChanged: (leftPageIndex, rightPageIndex) { print('Viewing pages: $leftPageIndex - $rightPageIndex'); }, // Custom loading UI loadingBuilder: (context, sourceDescription) { return Center(child: CircularProgressIndicator()); }, // Custom error UI errorBuilder: (context, title, message, onRetry) { return Center( child: Column( mainAxisSize: MainAxisSize.min, children: [ Text(title), Text(message), ElevatedButton(onPressed: onRetry, child: Text('Retry')), ], ), ); }, ), ), ], ), ); } } // Load PDF from assets TurnablePdf.asset( 'assets/docs/book.pdf', pageViewMode: PageViewMode.single, paperBoundaryDecoration: PaperBoundaryDecoration.vintage, ); // Load PDF from local file TurnablePdf.file( '/path/to/document.pdf', pageViewMode: PageViewMode.double, aspectRatio: 1.4, ); ``` -------------------------------- ### Display PDF from Assets with TurnablePdf Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Illustrates how to load and display a PDF file stored within the application's assets using `TurnablePdf.asset`. This example shows setting the asset path and specifying the page view mode. ```dart TurnablePdf.asset( 'assets/docs/book.pdf', pageViewMode: PageViewMode.single, ) ``` -------------------------------- ### Display Network PDF with TurnablePdf Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Provides an example of how to display a PDF document from a network URL using `TurnablePdf.network`. This includes configuring page view mode, paper decoration, and specific flip animation settings. ```dart TurnablePdf.network( 'https://example.com/sample.pdf', pageViewMode: PageViewMode.double, paperBoundaryDecoration: PaperBoundaryDecoration.modern, settings: FlipSettings( flippingTime: 800, swipeDistance: 60, cornerTriggerAreaSize: 0.15, ), ) ``` -------------------------------- ### TurnablePdf Network Loading Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Example of how to display a PDF document from a network URL using TurnablePdf. ```APIDOC ## TurnablePdf Network Loading ### Description Demonstrates how to use the `TurnablePdf.network` constructor to load and display a PDF file hosted on a remote server. ### Method Static factory constructor ### Endpoint N/A ### Parameters N/A ### Request Example ```dart TurnablePdf.network( 'https://example.com/sample.pdf', pageViewMode: PageViewMode.double, paperBoundaryDecoration: PaperBoundaryDecoration.modern, settings: FlipSettings( flippingTime: 800, swipeDistance: 60, cornerTriggerAreaSize: 0.15, ), ) ``` ### Response N/A #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Apply Paper Styling with PaperBoundaryDecoration Source: https://context7.com/saeedahmed725/turnable_page/llms.txt Shows how to apply predefined paper styling themes like 'vintage', 'modern', and 'parchment' using `PaperBoundaryDecoration`. It also illustrates creating custom paper decorations with specific colors, border radius, and alpha values for a realistic book appearance. ```dart import 'package:flutter/material.dart'; import 'package:turnable_page/turnable_page.dart'; // Using predefined themes TurnablePage( pageCount: 10, paperBoundaryDecoration: PaperBoundaryDecoration.vintage, // Aged paper look // OR // paperBoundaryDecoration: PaperBoundaryDecoration.modern, // Clean white // OR // paperBoundaryDecoration: PaperBoundaryDecoration.parchment, // Warm tones builder: (context, index, constraints) { return Container(child: Text('Page ${index + 1}')); }, ); // Custom paper decoration final customDecoration = PaperBoundaryDecoration( baseColor: Color(0xFFF5E6D3), shadowColor: Color(0xFF8B4513), borderColor: Color(0xFFD2B48C), innerBorderColor: Color(0xFFCD853F), glowColor: Color(0xFFDEB887), borderRadius: 4.0, outerAlpha: 0.6, middleAlpha: 0.4, innerAlpha: 0.2, shadowBlurRadius: 1.0, ); TurnablePage( pageCount: 10, paperBoundaryDecoration: customDecoration, builder: (context, index, constraints) { return Container(child: Text('Page ${index + 1}')); }, ); ``` -------------------------------- ### Initialize PDF Loaders for TurnablePdf Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Shows the necessary initialization step for the `TurnablePdf` helper wrapper. This `initPDFLoaders()` function should be called once before `runApp` to prepare the PDF loading mechanisms for network, asset, and file sources. ```dart void main() async { WidgetsFlutterBinding.ensureInitialized(); TurnablePdf.initPDFLoaders(); // prepare PDF loaders (network / asset / file) runApp(const MyApp()); } ``` -------------------------------- ### Customizing Page Flip Behavior with FlipSettings (Dart) Source: https://context7.com/saeedahmed725/turnable_page/llms.txt Illustrates how to configure the FlipSettings object to customize various aspects of the page-flipping experience, including animation duration, shadow effects, gesture sensitivity, and physics. This configuration is applied to the TurnablePage widget. ```dart import 'package:turnable_page/turnable_page.dart'; // Full configuration example with all available options final settings = FlipSettings( // Initial page to display (0-based index) startPageIndex: 0, // Animation configuration flippingTime: 700, // Flip animation duration in milliseconds drawShadow: true, // Enable realistic shadow effects maxShadowOpacity: 1.0, // Shadow opacity (0.0-1.0) hideLeftShadow: false, // Hide permanent left shadow // Gesture configuration swipeDistance: 100.0, // Minimum swipe distance in pixels cornerTriggerAreaSize: 0.2, // Corner trigger area as fraction of diagonal showPageCorners: true, // Show corner highlights on hover mobileScrollSupport: true, // Enable touch scrolling on mobile onlyVerticalPageFlip: false, // Restrict to vertical flip only // Physics and realism enableEasing: true, // Enable cubic easing for animations enableInertia: true, // Enable inertia for fast swipes inertiaVelocityThreshold: 900.0, // Velocity threshold for swipe detection inertiaProgressBoost: 0.15, // Extra progress allowance for inertia sagAmplitude: 0.08, // Vertical sag as fraction of page height bendStrength: 0.6, // Bend strength multiplier (0-1) // Display configuration usePortrait: true, // Single page mode (false for two-page spread) showCover: false, // Show front/back cover ); // Usage in TurnablePage TurnablePage( pageCount: 10, settings: settings, builder: (context, index, constraints) { return Container(child: Text('Page ${index + 1}')); }, ); ``` -------------------------------- ### TurnablePdf Initialization Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Instructions on how to initialize the PDF loading capabilities for the TurnablePdf wrapper. ```APIDOC ## TurnablePdf Initialization ### Description This section explains the necessary setup step to enable `TurnablePdf` to load PDF documents from various sources (network, assets, files). ### Method Static method call ### Endpoint N/A ### Parameters N/A ### Request Example ```dart void main() async { WidgetsFlutterBinding.ensureInitialized(); TurnablePdf.initPDFLoaders(); // prepare PDF loaders (network / asset / file) runApp(const MyApp()); } ``` ### Response N/A #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### FlipSettings Configuration Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Detailed configuration object for customizing the flip behavior and appearance of the TurnablePage. ```APIDOC ## FlipSettings Configuration ### Description This section outlines the parameters available within the `FlipSettings` object, which allows for fine-grained control over animations, shadows, and interaction. ### Method N/A (Configuration object) ### Endpoint N/A (Configuration object) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A #### Constructor Parameters - **`startPageIndex`** (`int`) - Optional - Default: `0` - Initial page to display (0-based index). - **`size`** (`SizeType`) - Optional - Default: `SizeType.fixed` - Size calculation: `SizeType.fixed` or `SizeType.stretch`. - **`width`** (`double`) - Optional - Default: `0` - Width of the book in pixels. - **`height`** (`double`) - Optional - Default: `0` - Height of the book in pixels. - **`drawShadow`** (`bool`) - Optional - Default: `true` - Whether to draw realistic shadow effects. - **`flippingTime`** (`int`) - Optional - Default: `700` - Duration of flip animation in milliseconds. - **`usePortrait`** (`bool`) - Optional - Default: `true` - `true` for single page, `false` for two-page spread. - **`maxShadowOpacity`** (`double`) - Optional - Default: `1.0` - Maximum opacity for shadow effects (0.0 to 1.0). - **`showCover`** (`bool`) - Optional - Default: `false` - Whether the book has a front/back cover. - **`mobileScrollSupport`** (`bool`) - Optional - Default: `true` - Enable touch scrolling on mobile devices. - **`swipeDistance`** (`double`) - Optional - Default: `100.0` - Minimum distance in pixels for swipe gesture. - **`showPageCorners`** (`bool`) - Optional - Default: `true` - Show interactive corner highlighting on hover. ### Request Example N/A (Configuration object) ### Response N/A (Configuration object) #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Customizing Flip Settings Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Shows how to configure gesture behavior for page flipping using FlipSettings. This allows adjustments to the trigger area size and swipe distance threshold. ```dart FlipSettings( cornerTriggerAreaSize: 0.15, // fraction of page diagonal for active corners swipeDistance: 80.0, // drag distance threshold ) ``` -------------------------------- ### Programmatic Page Navigation with PageFlipController (Dart) Source: https://context7.com/saeedahmed725/turnable_page/llms.txt Demonstrates how to use the PageFlipController in Flutter to programmatically navigate between pages, including flipping with animations and jumping to specific pages. It requires the 'turnable_page' package and Flutter's material library. ```dart import 'package:flutter/material.dart'; import 'package:turnable_page/turnable_page.dart'; class ControlledBookExample extends StatefulWidget { @override _ControlledBookExampleState createState() => _ControlledBookExampleState(); } class _ControlledBookExampleState extends State { final PageFlipController _controller = PageFlipController(); @override Widget build(BuildContext context) { return Scaffold( floatingActionButton: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ // Navigate to previous page with animation FloatingActionButton( onPressed: () { if (_controller.hasPreviousPage) { _controller.previousPage(FlipCorner.top); } }, child: Icon(Icons.arrow_back), ), // Jump to specific page FloatingActionButton( onPressed: () => _controller.goToPage(5), child: Icon(Icons.looks_5), ), // Navigate to next page with animation FloatingActionButton( onPressed: () { if (_controller.hasNextPage) { _controller.nextPage(FlipCorner.bottom); } }, child: Icon(Icons.arrow_forward), ), ], ), body: TurnablePage( controller: _controller, pageCount: 10, builder: (context, index, constraints) { return Container( color: Colors.white, child: Center(child: Text('Page ${index + 1}')), ); }, ), ); } } // Controller API reference: // _controller.currentPageIndex // Get current page (0-based) // _controller.pageCount // Get total pages // _controller.hasNextPage // Check if next page exists // _controller.hasPreviousPage // Check if previous page exists // _controller.nextPage() // Flip to next with animation // _controller.previousPage() // Flip to previous with animation // _controller.goToPage(index) // Jump to specific page // _controller.goToFirstPage() // Jump to first page // _controller.goToLastPage() // Jump to last page ``` -------------------------------- ### Basic Turnable Page Widget Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Demonstrates how to implement a simple book with a specified number of pages using the TurnablePage widget. Each page is built using a provided builder function. ```dart import 'package:flutter/material.dart'; import 'package:turnable_page/turnable_page.dart'; class MyBook extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( body: Center( child: TurnablePage( pageCount: 6, pageBuilder: (index, constraints) { return Container( decoration: BoxDecoration( color: Colors.white, border: Border.all(color: Colors.grey), ), child: Center( child: Text( 'Page ${index + 1}', style: TextStyle(fontSize: 24), ), ), ); }, ), ), ); } } ``` -------------------------------- ### TurnablePage Parameters and FlipSettings Configuration Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md This section outlines the various parameters available for the TurnablePage widget, controlling its behavior and appearance. It also details the FlipSettings configuration object for fine-tuning the page-flipping animation, size, and visual effects. ```dart TurnablePage( controller: controller, itemBuilder: itemBuilder, itemCount: itemCount, onPageChanged: onPageChanged, pageViewMode: PageViewMode.single, // or PageViewMode.double pixelRatio: pixelRatio, autoResponseSize: autoResponseSize, aspectRatio: aspectRatio, paperBoundaryDecoration: PaperBoundaryDecoration.vintage, // or modern, parchment settings: FlipSettings( startPageIndex: 0, size: SizeType.fixed, // or SizeType.stretch width: 0, height: 0, drawShadow: true, flippingTime: 700, usePortrait: true, maxShadowOpacity: 1.0, showCover: false, mobileScrollSupport: true, swipeDistance: 100.0, showPageCorners: true, ), ) ``` -------------------------------- ### Turnable Page Controller Usage Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Illustrates how to use the PageFlipController for programmatic control of page turning. This includes methods for navigating pages with and without animation, and properties to check page status. ```dart PageFlipController _controller = PageFlipController; _controller.previousPage(); _controller.nextPage(); _controller.goToPage(5); _controller.flipPrev(); _controller.flipNext(); _controller.flipToPage(5); _controller.hasPreviousPage; _controller.hasNextPage; ``` -------------------------------- ### TurnablePage Widget Parameters Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Configuration options for the main TurnablePage widget to control its behavior and appearance. ```APIDOC ## TurnablePage Widget Parameters ### Description This section details the parameters available for the `TurnablePage` widget, allowing for extensive customization of the page-turning experience. ### Method N/A (Widget parameters) ### Endpoint N/A (Widget parameters) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A #### Widget Parameters - **`controller`** (dynamic) - Optional - Controller for programmatic page control. - **`itemBuilder`** (Function) - Required - Builder function that creates widget content for each page. - **`itemCount`** (int) - Required - Total number of pages in the book. - **`onPageChanged`** (Function) - Optional - Callback fired when the page changes. - **`pageViewMode`** (PageViewMode) - Optional - Display mode: `PageViewMode.single` or `PageViewMode.double`. - **`pixelRatio`** (double) - Optional - Rendering pixel ratio for quality. - **`autoResponseSize`** (bool) - Optional - Whether to automatically adjust size to the container. - **`aspectRatio`** (double) - Optional - Custom aspect ratio for the book. - **`paperBoundaryDecoration`** (PaperBoundaryDecoration) - Optional - Visual style for page boundaries. - **`settings`** (FlipSettings) - Optional - Detailed flip behavior configuration. ### Request Example N/A (Widget parameters) ### Response N/A (Widget parameters) #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Responsive Design with TurnablePage Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Demonstrates how to configure TurnablePage for automatic responsive behavior. By setting `autoResponseSize` to true and `pageViewMode` appropriately, the widget adapts to different screen sizes, particularly in single-page view mode. ```dart // Automatic responsive behavior TurnablePage( autoResponseSize: true, // Adapts to device size only in single mode pageViewMode: PageViewMode.single, // Switches based on screen size // ... ) ``` -------------------------------- ### Clone Turnable Page Repository Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Clones the Turnable Page project repository from GitHub and navigates into the project directory. This is the first step in setting up the development environment. ```bash git clone https://github.com/saeedahmed725/turnable_page.git cd turnable_page ``` -------------------------------- ### Handle Page Flip Events in Dart Source: https://context7.com/saeedahmed725/turnable_page/llms.txt Demonstrates how to use the Turnable Page package in Flutter to listen for page flip events and update UI state. It utilizes the `PageFlipController` and the `onPageChanged` callback to track the current page and flip count. ```dart import 'package:flutter/material.dart'; import 'package:turnable_page/turnable_page.dart'; class EventHandlingExample extends StatefulWidget { @override _EventHandlingExampleState createState() => _EventHandlingExampleState(); } class _EventHandlingExampleState extends State { final PageFlipController _controller = PageFlipController(); int _flipCount = 0; int _currentPage = 0; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Page $_currentPage | Flips: $_flipCount'), ), body: TurnablePage( controller: _controller, pageCount: 10, onPageChanged: (leftPageIndex, rightPageIndex) { setState(() { _currentPage = rightPageIndex + 1; _flipCount++; }); }, builder: (context, index, constraints) { return Container( color: Colors.white, child: Center( child: Text( 'Page ${index + 1}', style: TextStyle(fontSize: 24), ), ), ); }, ), ); } } // Advanced event handling with addEventListener // _controller.addEventListener('flip', (event) { // print('Page flipped: ${event.data}'); // }); // _controller.removeEventListener('flip'); ``` -------------------------------- ### Control Page View Modes with PageViewMode Source: https://context7.com/saeedahmed725/turnable_page/llms.txt Demonstrates how to use the PageViewMode enum to control single-page or double-page spread display. The `autoResponseSize` property automatically adapts the view to the screen size, making it responsive. ```dart import 'package:turnable_page/turnable_page.dart'; // Single page view (portrait orientation) TurnablePage( pageCount: 10, pageViewMode: PageViewMode.single, autoResponseSize: true, // Adapts to device size builder: (context, index, constraints) { return Container(child: Text('Page ${index + 1}')); }, ); // Double page spread (landscape orientation) TurnablePage( pageCount: 10, pageViewMode: PageViewMode.double, aspectRatio: (2/3) * 2, // Custom aspect ratio for spread builder: (context, index, constraints) { return Container(child: Text('Page ${index + 1}')); }, ); ``` -------------------------------- ### PaperBoundaryDecoration Enum Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Defines the visual styling for the page boundaries. ```APIDOC ## PaperBoundaryDecoration Enum ### Description Enumeration to apply different visual styles to the edges or boundaries of the pages. ### Method N/A (Enum) ### Endpoint N/A (Enum) ### Parameters N/A ### Request Example N/A ### Response N/A #### Success Response (200) N/A #### Response Example N/A ### Enum Values - **`PaperBoundaryDecoration.vintage`**: Applies a vintage paper styling. - **`PaperBoundaryDecoration.modern`**: Applies a modern, clean styling. - **`PaperBoundaryDecoration.parchment`**: Applies a parchment-style textured paper with warm, aged tones. ``` -------------------------------- ### FlipCorner Enum Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Defines the corners from which page flips can be initiated. ```APIDOC ## FlipCorner Enum ### Description Enumeration specifying which corners of the page are interactive for initiating a flip gesture. ### Method N/A (Enum) ### Endpoint N/A (Enum) ### Parameters N/A ### Request Example N/A ### Response N/A #### Success Response (200) N/A #### Response Example N/A ### Enum Values - **`FlipCorner.topLeft`**: Flip initiated from the top-left corner. - **`FlipCorner.topRight`**: Flip initiated from the top-right corner. - **`FlipCorner.bottomLeft`**: Flip initiated from the bottom-left corner. - **`FlipCorner.bottomRight`**: Flip initiated from the bottom-right corner. ``` -------------------------------- ### SizeType Enum Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Defines how the size of the TurnablePage is calculated. ```APIDOC ## SizeType Enum ### Description Enumeration to determine the sizing behavior of the `TurnablePage` widget. ### Method N/A (Enum) ### Endpoint N/A (Enum) ### Parameters N/A ### Request Example N/A ### Response N/A #### Success Response (200) N/A #### Response Example N/A ### Enum Values - **`SizeType.fixed`**: Uses fixed dimensions specified by `width` and `height` properties. - **`SizeType.stretch`**: Stretches the widget to fit its parent container. ``` -------------------------------- ### PageViewMode Enum Source: https://github.com/saeedahmed725/turnable_page/blob/main/README.md Defines the display modes for the TurnablePage widget. ```APIDOC ## PageViewMode Enum ### Description Enumeration to specify how pages are displayed within the `TurnablePage` widget. ### Method N/A (Enum) ### Endpoint N/A (Enum) ### Parameters N/A ### Request Example N/A ### Response N/A #### Success Response (200) N/A #### Response Example N/A ### Enum Values - **`PageViewMode.single`**: Single page view (typically portrait orientation). - **`PageViewMode.double`**: Double page spread (typically landscape orientation). ``` -------------------------------- ### Control Page Flipping Corners in Dart Source: https://context7.com/saeedahmed725/turnable_page/llms.txt Shows how to programmatically control page flips using `PageFlipController` and specify the corner from which the page should turn. This affects the visual animation of the page turn, with options for top or bottom corners. ```dart import 'package:turnable_page/turnable_page.dart'; final controller = PageFlipController(); // Flip from top corner (default) controller.nextPage(FlipCorner.top); controller.previousPage(FlipCorner.top); // Flip from bottom corner controller.nextPage(FlipCorner.bottom); controller.previousPage(FlipCorner.bottom); // Go to specific page with corner selection controller.goToPage(5); // Uses top corner by default ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.