A _Flutter_ package that provides a diagonal scrollview.

Overview

Diagonal ScrollView for Flutter

pub package

THE PACKAGE IS DISCONTINUED!
Use InteractiveViewer instead.

A Flutter package that allows to scroll in both, horizontal and vertical direction, as well as zooming.

Usage

  • Import the package:
import 'package:diagonal_scrollview/diagonal_scrollview.dart';
  • Use it:
DiagonalScrollView(child: myWidget);

Example:

Using the controllers:

Comments
  • [Feature Request] Scroll to programatically

    [Feature Request] Scroll to programatically

    Thanks for a really cool widget!

    I am trying to figure out a way to scroll to a _position programmatically but I have not managed to solve it.

    For the scenario I had in mind I would need a way to programmatically move to specific offsets of the DiagonalScrollView when certain things happen but I am not sure how to accomplish that.

    All suggestions are welcome :-)

    enhancement 
    opened by johanlantz 6
  • Using PaginatedDataTable get error

    Using PaginatedDataTable get error

    DiagonalScrollView(child: DataTable(...)) -> It's OK

    DiagonalScrollView(child: PaginatedDataTable(...)) -> error

    ════════ Exception caught by rendering library ═════════════════════════════════════════════════════ The following assertion was thrown during paint(): RenderBox was not laid out: RenderPhysicalShape#3a534 relayoutBoundary=up9 'package:flutter/src/rendering/box.dart': Failed assertion: line 1702 pos 12: 'hasSize'

    opened by svsno1 5
  • getChildSize always return 0

    getChildSize always return 0

    So i use DiagonalScrollView to wrap my DataTable and because my table doesn't have a fix height and width i try to set a maxHeight and maxWidth using the size of my DataTable after it render using getChildSize from the controller.

    The problem is it always return 0 both on the height and width and now my table scrolls infinitely on both direction.

    opened by rakakhrl 5
  • Image always zoomed in

    Image always zoomed in

    I'm using diagonal scrollview to show different images of a map. The images have different sizes and aspect ratios, and the common issue (but maybe i'm missing something) is that even if i set different values of maximum scale, the image is always super-zoomed in when i open the app, and i have to manually zoom out. The desired behavior, in my case, is having the image zoomed out to match the width or the height with the container width or height, having the possibility to zoom in and scroll in every direction. Thanks in advance!

    opened by m-i-n-a-r 2
  • onScaleChanged never gets called

    onScaleChanged never gets called

    Hey,

    It seems that _handleScaleUpdate() never emits scaleChanged events because we set the state before the comparison so the new and old scale values are always be the same.

    setState(() {
      _scale = newScale;
      _lastFocalPoint = focalPoint; 
      _position = newPosition;
      _boxZoomOffset = newBoxZoomOffset;
    });
    _emitScroll();
    if (_scale != newScale) {
      _emitScaleChanged();   // this gets never called
    }
    

    Changing the code below seems to solve the issue:

    bool scaleChanged = _scale != newScale;
    setState(() {
      _scale = newScale;
      _lastFocalPoint = focalPoint;
      _position = newPosition;
      _boxZoomOffset = newBoxZoomOffset;
    });
    _emitScroll();
    if (scaleChanged) {
      _emitScaleChanged();
    }
    
    opened by deniza 1
  • Blank Screen (Image.File)

    Blank Screen (Image.File)

    Hi, I tried to open a file that I downloaded, it is 6386px by 5688px png

    DiagonalScrollView(
                enableFling: true,
                enableZoom: true,
                maxHeight: _boxSize,
                maxWidth: _boxSize,
                child: Image.file(snapshot.data) ,
                )
    

    I can see the image if I use any other widget such as a SizedBox or Container but when I use the diagonalScrollView I just have a blank screen. There are no errors in the debug console.

    flutter doctor -v
    [✓] Flutter (Channel dev, v1.10.14, on Mac OS X 10.15 19A602, locale en-GB)
        • Flutter version 1.10.14 at /Users/xxxxxx/Documents/Programming/flutter
        • Framework revision 1946fc4da0 (4 weeks ago), 2019-10-07 15:23:31 -0700
        • Engine revision 1d62160fdb
        • Dart version 2.6.0 (build 2.6.0-dev.1.0 d6c6d12ebf)
    
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
        • Android SDK at /Users/xxxxxx/Library/Android/sdk
        • Android NDK location not configured (optional; useful for native profiling support)
        • Platform android-28, build-tools 28.0.3
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
        • All Android licenses accepted.
    
     
    [✓] Xcode - develop for iOS and macOS (Xcode 11.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.1, Build version 11A1027
        • CocoaPods version 1.8.3
    
    [✓] Android Studio (version 3.5)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 39.0.3
        • Dart plugin version 191.8423
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    
    [✓] VS Code (version 1.39.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.6.0
    
    [✓] Connected device (2 available)
        • Nexus 7    • xxxxxxx        • android-arm   • Android 6.0.1 (API 23)
        • ASUS X00TD • xxxxxxx • android-arm64 • Android 9 (API 28)
    
    opened by l-k22 1
Owner
Ranfi Castillo de Aza
Ranfi Castillo de Aza
Flutter Scrollable Widgets like ListView,GridView or powerful CustomScrollView can't nest inner scrollview

Introduction Flutter Scrollable Widgets like ListView,GridView or powerful CustomScrollView can't nest inner scrollview. If Nested, inner scrollview w

jaysonss 5 Aug 28, 2022
A Flutter widget for Scrollview, pop when overscroll

overscroll_pop A Flutter widget for Scrollview, pop when overscroll like Instagram, Pinterest, ... Getting Started Include the package to your project

null 22 Dec 21, 2022
A wrapper for a Flutter ScrollView which enables lazy loading

Lazy load scrollview A wrapper for a ScrollView that will enable lazy loading Usage Add lazy_load_scrollview dependency to your pubspec.yaml: dependen

Quirijn Groot Bluemink 104 Nov 7, 2022
This example uses a ScrollView, JSON Rest API, Navigation, Alert Pop Up, Progress Indicator, Globals, Images in a shared asset folder, and 100% Shared Code

This example uses a ScrollView, JSON Rest API, Navigation, Alert Pop Up, Progress Indicator, Globals, Images in a shared asset folder, and 100% Shared Code. Now with the ability to login with FaceID, TouchID, and Fingerprint Reader on Android.

Rody Davis 672 Jan 6, 2023
A flutter package that provides multiple states for a button with endless customizability.

multi_state_button A package which provides multiple states for a button with endless customizability. Getting Started Add dependency dependencies:

null 4 Apr 11, 2022
A Flutter package that provides an Emoji Keyboard widget.

Flutter Choose Keyboard A Flutter package that provides an Emoji Keyboard widget. BASED IN: https://github.com/JeffG05/emoji_picker Key Features Flutt

null 1 Oct 22, 2021
This repo provides a starter kit thats include Getx package.

Getx_Starter This repo provides a starter kit thats include Getx package. It includes key-value databases, sample pages, and components which they are

Okan 2 Apr 27, 2022
A flutter UI package provides a cell widget that has leading and trailing swipe action menu.

Language: English |中文简体 flutter_swipe_action_cell A package that can give you a cell that can be swiped ,effect is like iOS native If you like this pa

WenJingRui 261 Jan 7, 2023
A dart package which provides a lot of helpers functions for easy development.

more_functions A dart package which provides a lot of helpers functions for easy development. Installation Add this to your packages pubspec.yaml file

Talat El Beick 0 Dec 5, 2021
A Flutter package that provides a WYSIWYG editor backed by flutter_inappwebview and the Summernote library.

Flutter Html Editor - Enhanced Flutter HTML Editor Enhanced is a text editor for Android, iOS, and Web to help write WYSIWYG HTML code with the Summer

Tanay Neotia 200 Dec 31, 2022
💳 A Flutter package for making payments via credo central. Provides support for both Android and iOS

?? Credo Package for Flutter TODO: Put a short description of the package here that helps potential users know whether this package might be useful fo

Samuel Abada 0 Dec 26, 2021
Flutter package that provides you custom clippers to help you achieve various custom shapes.

flutter_custom_clippers Flutter package that provides you custom clippers to help you achieve various custom shapes. Usage To use this plugin, add flu

Damodar Lohani 291 Dec 23, 2022
A flutter Package provides you a modern animated fancy segment

animated_segment This package will animates a segment. Package provides you a mo

MindInventory 24 Dec 10, 2022
A Flutter package that provides a dropdown form field using a dropdown button inside a form field.

Dropdown form field A dropdown form field using a dropdown button inside a form field. Demo Features Can be used as regular form field. Simple to impl

Carlos Eugenio Torres 72 Jan 1, 2023
A package provides an easy way to add shimmer effect in Flutter project

flutter_shimmer_widget A package provides an easy way to add shimmer effect in Flutter project Getting Started Animation Example Project There is a ex

Le Anh Tuan 4 Jun 29, 2022
This package provides some widgets you can use to create a smooshy UI.

Dough Library Squishy widgets for Flutter. Quick Links Dough Demos Here are a few samples of the different widgets provided by this repo. You can find

Josiah Saunders 537 Jan 8, 2023
Win32 registry - A package that provides a friendly Dart API for accessing the Windows registry

A package that provides a friendly Dart API for accessing the Windows registry.

Tim Sneath 20 Dec 23, 2022
This Flutter package provides a Search Widget for selecting an option from a data list

Search Widget This Flutter package provides a Search Widget for selecting an option from a data list. Provides filtering of items based on the search

Ayush P Gupta 194 Oct 31, 2022
Morphing Coffee 0 Jan 27, 2022