Nat  Grady

Nat Grady

1664274540

Rcdimple: Htmlwidgets for RCharts + Dimple

rcdimple | htmlwidget for dimple

rcdimple is the htmlwidget version of the dimple piece in rCharts. The goal is beautiful, customizable d3.js charts straight from R with minimal code and no knowledge of JavaScript. To get started, it is easy to install using devtools::install_github.

devtools::install_github("timelyportfolio/rcdimple")

Lots of Examples

Then for a complete replication of the examples in dimple, just do a demo.

library(rcdimple)
demo(dimple)

For additional discussion, see the post Week 11 | dimple as htmlwidget announcing this widget at Building Widgets. Look for many, many more examples in the future.

Waffle Charts with rcdimple

rcdimple already makes waffle charts by collaborating with waffle.

Download Details:

Author: Timelyportfolio
Source Code: https://github.com/timelyportfolio/rcdimple 
License: MIT license

#r #html #widgets #javascript 

Rcdimple: Htmlwidgets for RCharts + Dimple
Nat  Grady

Nat Grady

1664265480

Datamaps: Datamaps Test

Datamaps

NOTE: This repo is just for testing purposes

This is an htmlwidgets binding for the datamaps package.

Simple Map

Status: WORKING

library(datamaps)
datamaps()
datamaps(scope = 'usa')

Shiny App

Status: WORKING

library(shiny)
ui = bootstrapPage(
  selectInput('def_fill', 'Select Color', c('blue', 'green')),
  datamapsOutput('mymap', 800, 400)
)

server = function(input, output, session){
  output$mymap <- renderDatamaps(
    datamaps(
      fills = list(defaultFill = input$def_fill)
    )
  )
}

runApp(list(ui = ui, server = server), launch.browser = rstudio::viewer)

Map with External Data

Status: WORKING

This is to test if specifying external data using the attachment mechanism works.

datamaps(
  scope = 'pcs',
  geographyConfig = list(dataUrl = htmlwidgets:::attachment("data/pcs.json"))
)

Shiny App with External Data

Status: WORKING

This is to test if specifying external data in a shiny app using the attachment mechanism works.

library(shiny)
ui = bootstrapPage(
  selectInput('def_fill', 'Select Color', c('blue', 'green')),
  datamapsOutput('mymap', 900, 800)
)

server = function(input, output, session){
  output$mymap <- renderDatamaps(
    datamaps(
      scope = 'pcs', 
      geographyConfig = list(
        dataUrl = htmlwidgets:::attachment('data/pcs.json')
      ),
      fills = list(defaultFill = input$def_fill)
    )
  )
}

runApp(list(ui = ui, server = server), launch.browser = rstudio::viewer)

Download Details:

Author: Htmlwidgets
Source Code: https://github.com/htmlwidgets/datamaps 

#r #html #widgets #test 

Datamaps: Datamaps Test
Nat  Grady

Nat Grady

1664253120

jsTree: R Htmlwidget for inspecting Heirachal Structures

jsTree

R htmlwidget for inspecting heirachal structures with the ‘jQuery’ ‘jsTree’ Plugin.

Installation

#install.packages('jsTree')
remotes::install_github('yonicd/jsTree')

Conventional Use

library(jsTree)
data(states)
data(state_bird)

collapse columns to text (with sep “/”)

nested_string <- apply(states,1,paste,collapse='/')
jsTree(nested_string)

Add tooltips to state names with the state bird

jsTree(nested_string,tooltips = state_bird)

initialize tree with checked boxes for certain fields

nodestate1 <- states$variable=='Area'
jsTree(nested_string,nodestate=nodestate1)
nodestate2 <- states$variable=='Area'&grepl('^M',states$state.name)
jsTree(nested_string,nodestate=nodestate2)
nodestate3 <- states$variable %in% c('Murder') & states$value >= 10
nodestate4 <- states$variable %in% c('HS.Grad') & states$value <= 55
jsTree(nested_string,nodestate=nodestate3|nodestate4)

change the order of the hierarchy

nested_string2 <- apply(states[,c(4,1,2,3,5)],1,paste,collapse='/')
jsTree(nested_string2)

Use other delimiters to define the heirarchy

nested_string <- apply(states,1,paste,collapse='|-|')
jsTree(nested_string,sep = '|-|')

Interacting with remote repositories

Preview a github repo without cloning it

remotes::install_github('yonicd/vcs')

#get repo master branch directory structure
  vcs::navigate_remote('tidyverse/ggplot2')

Search text in files of a repo without cloning it

Download Details:

Author: Yonicd
Source Code: https://github.com/yonicd/jsTree 
License: View license 

#r #tree #html #widgets 

jsTree: R Htmlwidget for inspecting Heirachal Structures

A Flutter Plugin to Make any Widget Clickable Easily

On Pressed

Package to make any widget clickable easily.

How

Rather than dealing with wrapping the text in another widget, just add .onPressed to any widget and make it clickable easily.

Text("Click Me").onPressed((){
    print('I was clicked')
});

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add on_pressed

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  on_pressed: ^0.0.1

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:on_pressed/on_pressed.dart'; 

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:on_pressed/on_pressed.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {


 
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('OnPressed example app'),
        ),
        body: Center(
          child: Text('Click me').onPressed(()=>print('I have been pressed')),
        ),
      ),
    );
  }
} 

Download Details:

Author: 

Source Code: https://pub.dev/packages/on_pressed

#widgets #flutter #android 

A Flutter Plugin to Make any Widget Clickable Easily
fd MOMIN

fd MOMIN

1662703324

Flutter PDF Viewer Windows

Flutter PDF Viewer Windows

The Windows implementation of Syncfusion Flutter PDF Viewer plugin.

Usage

Import the package

This package is an endorsed implementation of syncfusion_flutter_pdfviewer for the Windows platform since version 20.1.0-beta, so it gets automatically added to your dependencies when you depend on package syncfusion_flutter_pdfviewer.

...
dependencies:
  ...
  syncfusion_flutter_pdfviewer: ^20.1.0-beta
  ...
...

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add syncfusion_pdfviewer_windows

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  syncfusion_pdfviewer_windows: ^20.2.48-beta

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more. 

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';

void main() {
  runApp(const MaterialApp(
    title: 'Syncfusion PDF Viewer Demo for Windows',
    home: HomePage(),
  ));
}

/// Represents Homepage for Navigation
class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  _HomePage createState() => _HomePage();
}

class _HomePage extends State<HomePage> {
  final GlobalKey<SfPdfViewerState> _pdfViewerKey = GlobalKey();

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Syncfusion Flutter PDF Viewer'),
        actions: <Widget>[
          IconButton(
            icon: const Icon(
              Icons.bookmark,
              color: Colors.white,
            ),
            onPressed: () {
              _pdfViewerKey.currentState?.openBookmarkView();
            },
          ),
        ],
      ),
      body: SfPdfViewer.network(
        'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf',
        key: _pdfViewerKey,
      ),
    );
  }
} 

Download Details:

Author: flutter-widgets

Source Code: https://github.com/syncfusion/flutter-widgets/tree/master/packages/syncfusion_pdfviewer_windows

#flutter #widgets 

Flutter PDF Viewer Windows

Flutter PDF Viewer Windows

Flutter PDF Viewer Windows

The Windows implementation of Syncfusion Flutter PDF Viewer plugin.

Usage

Import the package

This package is an endorsed implementation of syncfusion_flutter_pdfviewer for the Windows platform since version 20.1.0-beta, so it gets automatically added to your dependencies when you depend on package syncfusion_flutter_pdfviewer.

...
dependencies:
  ...
  syncfusion_flutter_pdfviewer: ^20.1.0-beta
  ...
...

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add syncfusion_pdfviewer_windows

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  syncfusion_pdfviewer_windows: ^20.2.48-beta

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more. 

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';

void main() {
  runApp(const MaterialApp(
    title: 'Syncfusion PDF Viewer Demo for Windows',
    home: HomePage(),
  ));
}

/// Represents Homepage for Navigation
class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  _HomePage createState() => _HomePage();
}

class _HomePage extends State<HomePage> {
  final GlobalKey<SfPdfViewerState> _pdfViewerKey = GlobalKey();

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Syncfusion Flutter PDF Viewer'),
        actions: <Widget>[
          IconButton(
            icon: const Icon(
              Icons.bookmark,
              color: Colors.white,
            ),
            onPressed: () {
              _pdfViewerKey.currentState?.openBookmarkView();
            },
          ),
        ],
      ),
      body: SfPdfViewer.network(
        'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf',
        key: _pdfViewerKey,
      ),
    );
  }
} 

Download Details:

Author: flutter-widgets

Source Code: https://github.com/syncfusion/flutter-widgets/tree/master/packages/syncfusion_pdfviewer_windows

#flutter #widgets 

Flutter PDF Viewer Windows

A Library That Contains Widgets That Utilize android Specific Code

touchkit_android

A library that contains widgets that utilize Android specific code.

Getting Started

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add touchkit_android

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  touchkit_android: ^0.0.1

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:touchkit_android/touchkit_android.dart'; 

Download Details:

Author: 

Source Code: https://pub.dev/packages/touchkit_android

#android #widgets 

A Library That Contains Widgets That Utilize android Specific Code

Interactive widgets to work with tabular data in Julia

TableWidgets

This package contains a few basic widgets to build GUIs to work with tabular data as well as examples of such GUIs.

Examples

To run the examples, you need to activate the respective folder and instantiate it to get all dependencies.

import Pkg
import TableWidgets: examplefolder
Pkg.activate(examplefolder)
Pkg.instantiate()
include(joinpath(examplefolder, "explorer", "sputnik.jl"))

tablewidgetsdemo

Download Details:

Author: Piever
Source Code: https://github.com/piever/TableWidgets.jl 
License: View license

#julia #table #widgets 

Interactive widgets to work with tabular data in Julia

A Flutter Widget That Imposes Different Constraints

intrinsic_size_overflow_box

A Flutter widget that imposes different constraints on its child than it gets from its parent, possibly allowing the child to overflow the parent.

Similar to OverflowBox except that the unconstrained width or height is sized to the intrinsic size of the child, instead of being assumed to be infinite, which allows IntrinsicSizeOverflowBox to be used in a Scrollable widget.

Try it out at: https://ronjb.github.io/intrinsic_size_overflow_box

Getting Started

Add this to your app's pubspec.yaml file:

dependencies:
  intrinsic_size_overflow_box: ^0.1.0

Usage

Then you have to import the package with:

import 'package:intrinsic_size_overflow_box/intrinsic_size_overflow_box.dart';

And use IntrinsicSizeOverflowBox where appropriate. For example:

ListView(
  children: const [
      IntrinsicSizeOverflowBox(
          maxWidth: 700.0,
          child: Text(text),
      ),
  ],
),

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add intrinsic_size_overflow_box

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  intrinsic_size_overflow_box: ^0.1.1

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:intrinsic_size_overflow_box/intrinsic_size_overflow_box.dart'; 

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:intrinsic_size_overflow_box/intrinsic_size_overflow_box.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'IntrinsicSizeOverflowBox Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  static const _maxWidth = 300.0;
  var _width = _maxWidth;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('IntrinsicSizeOverflowBox Demo')),
      body: SafeArea(
        child: Center(
          child: SizedBox(
            width: _maxWidth,
            child: SingleChildScrollView(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  Text(
                    'Drag this slider to adjust the clip width.',
                    style: Theme.of(context).textTheme.headline6,
                  ),
                  ConstrainedBox(
                    constraints: const BoxConstraints(maxWidth: _maxWidth),
                    child: Slider(
                      value: _width,
                      min: 0,
                      max: _maxWidth,
                      label: _width.round().toString(),
                      onChanged: (value) => setState(() => _width = value),
                    ),
                  ),
                  Text(
                    'Text wrapping at ${_maxWidth.round()} pts, '
                    'but clipping at ${_width.round()} pts',
                    style: Theme.of(context).textTheme.headline6,
                  ),
                  ClipRect(
                    child: SizedBox(
                      width: _width,
                      child: const IntrinsicSizeOverflowBox(
                        maxWidth: _maxWidth,
                        child: Text(_lorem),
                      ),
                    ),
                  ),
                  Text(
                    'A Row with an intrinsic size of ${_maxWidth.round()} pts, '
                    'clipping at ${_width.round()} pts',
                    style: Theme.of(context).textTheme.headline6,
                  ),
                  ClipRect(
                    child: SizedBox(
                      width: _width,
                      child: IntrinsicSizeOverflowBox(
                        child: Row(
                          mainAxisSize: MainAxisSize.min,
                          children: [
                            Container(
                                width: 100, height: 100, color: Colors.red),
                            Container(
                                width: 100, height: 100, color: Colors.green),
                            Container(
                                width: 100, height: 100, color: Colors.blue),
                          ],
                        ),
                      ),
                    ),
                  ),
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}

// cspell: disable
const _lorem = '''
Lorem dolor sed viverra ipsum nunc aliquet bibendum enim facilisis. Sagittis 
purus sit amet volutpat consequat mauris. Dolor sit amet consectetur adipiscing 
elit ut. Id leo in vitae turpis massa sed elementum.
'''; 

Download Details:

Author: ronjb

Source Code: https://github.com/ronjb/intrinsic_size_overflow_box

#flutter #widgets 

A Flutter Widget That Imposes Different Constraints
Mike  Kozey

Mike Kozey

1661911080

Responsive Widgets Prefix Allows You to Add The "Responsive" Prefix

Responsive Widgets Prefix allows you to add the "Responsive" prefix to any widget that needs scaling or font size increases (for varying device screen sizes).

Features

When not using Responsive widgets, you can run into issues with scaling like the following:

Non Responsive Text

Non Responsive Setup

          ...
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],

Default ResponsiveText

When using Responsive Widgets Prefix, you can scale effectively, and customize your scale amount as well.

Default Responsive Setup

          ...
          children: <Widget>[
            ResponsiveText(
              'You have pushed the button this many times:',
            ),
            ResponsiveText(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],

Customized ResponsiveText (scaleMediumTablet)

Here the scaleMediumTablet customization is added to make the counter text even larger on Medium Tablet (iPad / Nexus 10 / and more) screen sizes.

Custom Responsive Setup

          ...
          children: <Widget>[
            ResponsiveText(
              'You have pushed the button this many times:',
            ),
            ResponsiveText(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
              scaleMediumTablet: 4,
            ),
          ],

Note: The widgets below are currently supported, but we welcome widget requests for new responsive widgets.

VisualVisualInteractiveInteractiveStructuralPlatform
AssetImageImageIconButtonSwitchContainerMaterialApp
TextIconCheckboxFAButton (FAB)PaddingCupertinoApp
CardCircleAvatarButtonThemeTextFormField AppBar
  SliderTextField  
  TextButtonCupertinoTextField  

Note: The following widgets are currently not supported, but click on the link below to create an issue for a new responsive widget request.

VisualInteractive
CircularProgressIndicatorCheckbox
TooltipFormField
CupertinoActivityIndicatorCupertinoButton

Getting started

Install Responsive Widgets Prefix


  flutter pub get responsive_widgets_prefix

Or install Responsive Widgets Prefix (in pubspec.yaml)


    ...
    
dependencies:
  flutter:
    sdk: flutter

    ...

  responsive_widgets_prefix: <latest_version>

Add Responsive Widgets Prefix import


import 'package:responsive_widgets_prefix/responsive_widgets_prefix.dart';

Finally, create a Responsive App

In the case of a MaterialApp, all you would need to do is add the Responsive prefix.


  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return ResponsiveMaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

Note: Alternatively, if you are using a CupertinoApp the same Responsive prefix can be added.


  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return ResponsiveCupertinoApp(
      title: 'Flutter Demo',
      theme: CupertinoThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primaryColor below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primaryColor: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

Usage

Our first example will be the Counter Sample project. With this project we can integrate the Responsive Widgets prefix to scale the UI, for the appropriate screen size (and preview the results).

Create platforms file (lib/platforms.dart)


import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class PlatformApp extends PlatformWidget {

  PlatformApp({
    Key? key,
    required MaterialApp androidApp,
    required CupertinoApp iosApp,
    required TargetPlatform defaultPlatform,
  }) : super(key: key,
      androidBuilder: (BuildContext context) => androidApp,
      iosBuilder:  (BuildContext context) => iosApp
    ) {
      PlatformWidget.setPlatform(defaultPlatform);
  }

}

class PlatformWidget extends StatefulWidget {
  
  static TargetPlatform? _defaultPlatform;

  static get platform {
      if(_defaultPlatform == null) {
        return TargetPlatform.android;
      }
      return _defaultPlatform;
  }

  static get isAndroid {
      return _defaultPlatform == TargetPlatform.android;
  }

  static get isIOS {
      return _defaultPlatform == TargetPlatform.iOS;
  }

  static void setPlatform(TargetPlatform platform) {
      _defaultPlatform = platform;
  }

  static void reassembleApplication() {
      WidgetsBinding.instance!.reassembleApplication();
  }

  const PlatformWidget({
    Key? key,
    required this.androidBuilder,
    required this.iosBuilder,
  }) : super(key: key);

  final WidgetBuilder androidBuilder;
  final WidgetBuilder iosBuilder;

  @override
  State<PlatformWidget> createState() => _PlatformWidgetState();
}

class _PlatformWidgetState extends State<PlatformWidget> {
  @override
  Widget build(context) {
    switch (PlatformWidget._defaultPlatform) {
      case TargetPlatform.android:
        return widget.androidBuilder(context);
      case TargetPlatform.iOS:      
        return widget.iosBuilder(context);        
      default:
        assert(false, 'Unexpected platform ${PlatformWidget._defaultPlatform}');
        return Container();
    }
  }
}

Create main file (lib/main.dart)


import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:responsive_widgets_prefix/responsive_widgets_prefix.dart';

import 'platforms.dart';

void main() => runApp(setupMainWidget());

Widget setupMainWidget() {
  WidgetsFlutterBinding.ensureInitialized();
  return const MyApp();
}
class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override Widget build(BuildContext context) {
    return PlatformApp(
        defaultPlatform: PlatformWidget.platform,
        androidApp: ResponsiveMaterialApp(
          theme: ThemeData(primarySwatch: Colors.blue),
          home: const MyHomePage(title: 'Counter Sample')
        ),
        iosApp: ResponsiveCupertinoApp(
            theme: const CupertinoThemeData(primaryColor: Colors.blue),
            home: const MyHomePage(title: 'Counter Sample'),
        )
    );
  }
}

class MyHomePage extends StatefulWidget {
  final String title;
  const MyHomePage({Key? key, required this.title}) : super(key: key);
  @override State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }
  @override Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.title)),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ResponsiveText('You have pushed the button this many times:'),
            ResponsiveText('$_counter', style: Theme.of(context).textTheme.headline4, scaleMediumTablet: 4),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter, tooltip: 'Increment', child: const Icon(Icons.add),
      ),
    );
  }
}

The comparisons would look like the following:

Samsung A50iPhone 12 Max ProiPad Pro 11 Inches

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add responsive_widgets_prefix

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  responsive_widgets_prefix: ^0.0.5

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:responsive_widgets_prefix/responsive_widgets_prefix.dart';

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:responsive_widgets_prefix/responsive_widgets_prefix.dart';

import 'platforms.dart';

void main() => runApp(setupMainWidget());

Widget setupMainWidget() {
  WidgetsFlutterBinding.ensureInitialized();
  return const MyApp();
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override Widget build(BuildContext context) {
    return PlatformApp(
        defaultPlatform: PlatformWidget.platform,
        androidApp: ResponsiveMaterialApp(
          theme: ThemeData(primarySwatch: Colors.blue),
          home: const MyHomePage()
        ),
        iosApp: ResponsiveCupertinoApp(
            theme: const CupertinoThemeData(primaryColor: Colors.blue),
            home: const MyHomePage(),
        )
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);
  @override State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }
  @override Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ResponsiveText('You have pushed the button this many times:'),
            ResponsiveText('$_counter', key: const Key('counter-page-text'), style: Theme.of(context).textTheme.headline4, scaleMediumTablet: 4),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter, tooltip: 'Increment', child: const Icon(Icons.add),
      ),
    );
  }
}

Additional information

Package Support

To support this repo, take a look at the SUPPORT.md file.

Package Documentation

To view the documentation on the package, follow this link

Download Details:

Author: The-mac
Source Code: https://github.com/the-mac/responsive_widgets_prefix 
License: MIT license

#flutter #dart #widgets 

Responsive Widgets Prefix Allows You to Add The "Responsive" Prefix
Nat  Grady

Nat Grady

1661290920

ShinyWidgets: Extend Widgets Available in Shiny

shinyWidgets

Extend widgets available in shiny

Overview

This package offers custom widgets and other components to enhance your shiny applications.

You can replace classical checkboxes with switch button, add colors to radio buttons and checkbox group, use buttons as radio or checkboxes. Each widget has an update method to change the value of an input from the server.

Installation

Install from CRAN with:

install.packages("shinyWidgets")

Or install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("dreamRs/shinyWidgets")

Demo

A gallery application is included in the package. Once installed, use the following command to launch it:

shinyWidgets::shinyWidgetsGallery()

A live version is available here : http://shinyapps.dreamrs.fr/shinyWidgets

Bootstrap switch

Turn checkboxes into toggle switches :

switchInput

switchInput(inputId = "id", value = TRUE)

Material switch

Turn checkboxes into toggle switches :

materialSwitch

materialSwitch(inputId = "id", label = "Primary switch", status = "danger")

Pretty Checkbox

Checkbox and radio buttons with the beautiful CSS library pretty-checkbox : prettycheckbox

prettyCheckbox(
  inputId = "pretty_1", label = "Check me!", icon = icon("check")
),
prettyCheckbox(
  inputId = "pretty_2", label = "Check me!", icon = icon("thumbs-up"), 
  status = "default", shape = "curve", animation = "pulse"
),
prettyCheckbox(
  inputId = "pretty_3", label = "Check me!", icon = icon("users"), 
  animation = "pulse", plain = TRUE, outline = TRUE
),
prettyCheckbox(
  inputId = "pretty_4", label = "Check me!",
  status = "success", outline = TRUE
),
prettyCheckbox(
  inputId = "pretty_5", label = "Check me!",
  shape = "round", outline = TRUE, status = "info"
),

# ...

Sweet Alert

Show an alert message to the user to provide some feedback, via sweetalert2 library:

sendSweetAlert

See examples in ?show_alert.

Request confirmation from the user :

confirmSweetAlert

See examples in ?ask_confirmation.

Slider Text

Slider with strings, to pass whatever you want : 
sliderText

sliderTextInput(
  inputId = "mySliderText", 
  label = "Your choice:", 
  grid = TRUE, 
  force_edges = TRUE,
  choices = c("Strongly disagree",
              "Disagree", "Neither agree nor disagree", 
              "Agree", "Strongly agree")
)

Select picker

Dropdown menu with a lot of options :

pickerInput

pickerInput(
  inputId = "myPicker", 
  label = "Select/deselect all + format selected", 
  choices = LETTERS, 
  options = list(
    `actions-box` = TRUE, 
    size = 10,
    `selected-text-format` = "count > 3"
  ), 
  multiple = TRUE
)

Checkbox and radio buttons

Turn buttons into checkbox or radio :

checkboxGroupButtons

checkboxGroupButtons(
  inputId = "somevalue", label = "Make a choice :", 
  choices = c("Choice A", "Choice B", " Choice C", "Choice D"), 
  justified = TRUE, status = "primary",
  checkIcon = list(yes = icon("ok", lib = "glyphicon"), no = icon("remove", lib = "glyphicon"))
)

Search input

A text input only triggered by hitting 'Enter' or clicking search button :

search_input

searchInput(
  inputId = "id", 
  label = "Enter your search :", 
  placeholder = "This is a placeholder", 
  btnSearch = icon("search"), 
  btnReset = icon("remove"), 
  width = "100%"
)

Dropdown button

Hide input in a button :
dropdown_off dropdown_on

dropdownButton(
  tags$h3("List of Input"),
  selectInput(inputId = 'xcol', label = 'X Variable', choices = names(iris)),
  selectInput(inputId = 'ycol', label = 'Y Variable', choices = names(iris), selected = names(iris)[[2]]),
  sliderInput(inputId = 'clusters', label = 'Cluster count', value = 3, min = 1, max = 9),
  circle = TRUE, status = "danger", icon = icon("cog"), width = "300px",
  tooltip = tooltipOptions(title = "Click to see inputs !")
)

See also ?dropMenu()

Download Details:

Author: DreamRs
Source Code: https://github.com/dreamRs/shinyWidgets 
License: GPL-3.0 license

#r #widgets #hacktoberfest 

ShinyWidgets: Extend Widgets Available in Shiny
Nat  Grady

Nat Grady

1661248283

ShinySky: Various UI Widgets/components Not Part Of Shiny E.g. Alerts

ShinySky

Various UI widgets/components used by AnalytixWare's flagship product e.g. alerts, styled buttons

alt text

Install

To install the latest version

if (require(devtools)) install.packages("devtools")#if not already installed
devtools::install_github("AnalytixWare/ShinySky")

Quick Start

Simply the run the examples and take a look at the code included inside the example Shiny app

library(shinysky)
shinysky::run.shinysky.example()

Usage

library(shinysky)

Action Buttons

actionButton(inputId, label, styleclass = yourStyle)

Specify the style with the styleclass argument. The possible styles are "primary", "info", "success", "warning", "danger", "inverse", "link", ""

Alerts

ui.R

shinyalert(id, click.hide = TRUE, auto.close.after = NULL)

In the past clicking on the alert will hide it. Setting click.hide = FALSE can prevent this behaviour The auto.close.after can take a number and will close the alert after this many seconds.

Simply provide an id. The alert will be hidden until you show it using showshinyalert in server.R

server.R

showshinyalert(session,id,HTMLtext,styleclass)

Put some valid HTML in HTMLtext. Here you can specify the style you want using the styleclass parameter. The possible styles are "primary", "info", "success", "warning", "danger", "inverse", "link", ""

Select2

The below will create a multiple select2 with "a", "b", "c" as choices

select2Input("select2Input1","This is a multiple select2Input",choices=c("a","b","c"),selected=c("b","a"))

Video Demo

Video Demo

Typeahead Text Input

textInput.typeahead(
    id="thti"
    ,placeholder="type 'name' or '2'"
    ,local=data.frame(name=c("name1","name2"),info=c("info1","info2"))
    ,valueKey = "name"
    ,tokens=c(1,2)
    ,template = HTML("<p class='repo-language'>{{info}}</p> <p class='repo-name'>{{name}}</p> <p class='repo-description'>You need to learn more CSS to customize this further</p>")
  )

Busy Indicator

ui.R

busyIndicator(wait = 1000)

Here the wait determines how long to wait before showing the buys indicator. The default is wait=1000, which is one second. This is to prevent short computation triggering the busyIndicator.

Events Buttons

eventsButton(inputId, label, events = c("dblclick"))

This button will invalidate (become dirty) upon the events. The event does not have to be a "click", in fact the default is dblclick. You can specify multiple events. For a list of event types See: http://api.jquery.com/category/events/mouse-events/

Handsontable Input/Output

ui.R

hotable("hotable1")

This will create a handsontable which you can output using

output$hotable1 <- renderHotable({...})

server.R

something <- reactive({
    hot.to.df(input$hotable1) # this will convert your input into a data.frame
})

Do you need help with Shiny?

Contact me on Codementor

I am available for Shiny consulting! Email me to get 10% discount off the hourly rate.

Download Details:

Author: AnalytixWare
Source Code: https://github.com/AnalytixWare/ShinySky 
License: View license

#r #ui #widgets #components 

ShinySky: Various UI Widgets/components Not Part Of Shiny E.g. Alerts
Lawson  Wehner

Lawson Wehner

1660940460

Labeled_widgets: Label The Widgets

labeled_widgets

Label the widgets, let click on the text also work. Now there are only four widgets: LabeledCheckBox, LabeledSwitch, LabeledCupertinoSwitch, LabeledRadio. All parameters are exported, the usage method is exactly the same as the original widgets, and four attributes are added to the label to simplify the use: labelColor, labelCheckColor, labelFontSize, labelFontWeight

LabeledCheckbox

bool? _checkboxValue = false;

LabeledCheckbox(
  label: 'Label',
  value: _checkboxValue,
  labelCheckColor: Colors.blue,
  onChanged: (value) {
    setState(() {
      _checkboxValue = value;
    });
  },
),

LabeledSwitch

bool _switchValue = false;

LabeledSwitch(
    label: 'Label',
    value: _switchValue,
    labelCheckColor: Colors.blue,
    onChanged: (value) {
        setState(() {
          _switchValue = value;
        });
    },
),

LabeledCupertinoSwitch

bool _cupertinoSwitchValue = false;

LabeledCupertinoSwitch(
    label: 'Label',
    value: _cupertinoSwitchValue,
    labelCheckColor: Colors.blue,
    onChanged: (value) {
        setState(() {
          _cupertinoSwitchValue = value;
        });
    },
),

LabeledRadio

int? _radioValue = 0;
LabeledRadio<int>(
    label: 'Label 0',
    value: 0,
    groupValue: _radioValue,
    labelCheckColor: Colors.blue,
    onChanged: (value) {
        setState(() {
          _radioValue = value;
        });
    },
),
LabeledRadio<int>(
    label: 'Label 1',
    value: 1,
    groupValue: _radioValue,
    labelCheckColor: Colors.green,
    onChanged: (value) {
        setState(() {
          _radioValue = value;
        });
    },
),

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add labeled_widgets

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  labeled_widgets: ^1.0.0

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:labeled_widgets/labeled_widgets.dart';

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:labeled_widgets/labeled_widgets.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  bool? _checkboxValue = false;
  bool _switchValue = false;
  bool _cupertinoSwitchValue = false;
  int? _radioValue = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            LabeledCheckbox(
              label: 'Label',
              value: _checkboxValue,
              labelCheckColor: Colors.blue,
              onChanged: (value) {
                setState(() {
                _checkboxValue = value;
                });
              },
            ),
            LabeledSwitch(
              label: 'Label',
              value: _switchValue,
              labelCheckColor: Colors.blue,
              onChanged: (value) {
                setState(() {
                  _switchValue = value;
                });
              },
            ),
            LabeledCupertinoSwitch(
              label: 'Label',
              value: _cupertinoSwitchValue,
              labelCheckColor: Colors.blue,
              onChanged: (value) {
                setState(() {
                  _cupertinoSwitchValue = value;
                });
              },
            ),
            LabeledRadio<int>(
              label: 'Label 0',
              value: 0,
              groupValue: _radioValue,
              labelCheckColor: Colors.blue,
              onChanged: (value) {
                setState(() {
                  _radioValue = value;
                });
              },
            ),
            LabeledRadio<int>(
              label: 'Label 1',
              value: 1,
              groupValue: _radioValue,
              labelCheckColor: Colors.green,
              onChanged: (value) {
                setState(() {
                  _radioValue = value;
                });
              },
            ),
            LabeledRadio<int>(
              label: 'Label 2',
              value: 2,
              groupValue: _radioValue,
              labelCheckColor: Colors.red,
              onChanged: (value) {
                setState(() {
                  _radioValue = value;
                });
              },
            ),
          ],
        ),
      ),
    );
  }
}

Download Details:

Author: ctcwri
Source Code: https://github.com/ctcwri/labeled_widgets 
License: BSD-3-Clause license

#flutter #dart #widgets 

Labeled_widgets: Label The Widgets

A plugin to the JSON Dynamic Widget Plugin Charts Flutter

Table of Contents

json_dynamic_widget_plugin_charts_flutter

Table of Contents

Live Example

Introduction

Plugin to the JSON Dynamic Widget to provide Charts support utilizing the charts_flutter.

Using the Plugin

import 'package:json_dynamic_widget/json_dynamic_widget.dart';
import 'package:json_dynamic_widget_plugin_charts_flutter/json_dynamic_widget_plugin_charts_flutter.dart';


void main() {
  // Ensure Flutter's binding is complete
  WidgetsFlutterBinding.ensureInitialized();

  // ...

  // Get an instance of the registry
  var registry = JsonWidgetRegistry.instance;

  // Bind the plugin to the registry.  This is necessary for the registry to
  // find the widget provided by the plugin
  JsonChartsFlutterPlugin.bind(registry);

  // ...
}

See the extensive examples for usage information via the JSON renderers. All examples were borrowed from the official charts_flutter online gallery

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add json_dynamic_widget_plugin_charts_flutter

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  json_dynamic_widget_plugin_charts_flutter: ^3.0.0+12

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:json_dynamic_widget_plugin_charts_flutter/json_dynamic_widget_plugin_charts_flutter.dart'; 

example/lib/main.dart

import 'dart:convert';
import 'dart:math' as math;

import 'package:example/src/custom_functions/confidence_interval_functions.dart';
import 'package:example/src/custom_functions/selection_callback_functions.dart';
import 'package:example/src/custom_functions/series_legend_with_measure_functions.dart';
import 'package:example/src/custom_functions/slider_functions.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:intl/intl.dart';
import 'package:json_dynamic_widget/json_dynamic_widget.dart';
import 'package:json_dynamic_widget_plugin_charts_flutter/json_dynamic_widget_plugin_charts_flutter.dart';
import 'package:json_theme/json_theme_schemas.dart';
import 'package:logging/logging.dart';

import 'src/custom_functions/confidence_interval_functions.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  SchemaValidator.enabled = false;

  if (kDebugMode) {
    Logger.root.level = Level.FINE;
    Logger.root.onRecord.listen((record) {
      debugPrint(
        '[${record.loggerName}]: ${record.message}',
      );
      if (record.error != null) {
        debugPrint('${record.error}');
      }
      if (record.stackTrace != null) {
        debugPrint('${record.stackTrace}');
      }
    });
  } else {
    Logger.root.level = Level.INFO;
    Logger.root.onRecord.listen((record) {
      debugPrint(
        '[${record.loggerName}]: ${record.level.name}: ${record.time}: ${record.message}',
      );
      if (record.error != null) {
        debugPrint('${record.error}');
      }
      if (record.stackTrace != null) {
        debugPrint('${record.stackTrace}');
      }
    });
  }

  var navigatorKey = GlobalKey<NavigatorState>();

  var registry = JsonWidgetRegistry.instance;

  registry.setValue(
    'NumberFormat.compactSimpleCurrency',
    NumberFormat.compactSimpleCurrency(),
  );
  registry.setValue('pi', math.pi);
  registry.setValue('Icons.cloud', Icons.cloud);

  registry.registerFunction(
    'loadTemplate',
    ({args, required registry}) => registry.getValue(
      args![0],
    ),
  );
  ConfidenceIntervalFunctions.functions.forEach(
    (key, value) => registry.setValue(key, value),
  );
  SelectionCallbackFunctions.functions.forEach(
    (key, value) => registry.setValue(key, value),
  );
  SeriesLegendWithMeasuresFunctions.functions.forEach(
    (key, value) => registry.setValue(key, value),
  );
  SliderFunctions.functions.forEach(
    (key, value) => registry.setValue(key, value),
  );

  JsonChartsFlutterPlugin.bind(registry);

  registry.navigatorKey = navigatorKey;

  var templates = {
    // bar
    'simple_bar_chart': 'bar',
    'stacked_bar_chart': 'bar',
    'grouped_bar_chart': 'bar',
    'grouped_stacked_bar_chart': 'bar',
    'grouped_target_line_bar_chart': 'bar',
    'stacked_horizontal_bar_chart': 'bar',
    'stacked_target_line_bar_chart': 'bar',
    'horizontal_bar_chart': 'bar',
    'horizontal_label_bar_chart': 'bar',
    'vertical_label_bar_chart': 'bar',
    'spark_bar_chart': 'bar',
    'grouped_fill_color_bar_chart': 'bar',
    'stacked_fill_color_bar_chart': 'bar',
    'pattern_forward_hatch_bar_chart': 'bar',
    'horizontal_pattern_forward_hatch_bar_chart': 'bar',
    'grouped_stacked_weight_pattern_bar_chart': 'bar',
    'custom_rounded_bar_chart': 'bar',

    // time series
    'simple_time_series': 'time_series',
    'end_points_axis_time_series': 'time_series',
    'confidence_interval_time_series': 'time_series',
    'line_annotation_time_series': 'time_series',
    'range_annotation_time_series': 'time_series',
    'range_annotation_margin_time_series': 'time_series',
    'symbol_annotation_time_series': 'time_series',
    'with_bar_renderer_time_series': 'time_series',

    // line
    'simple_line_chart': 'line',
    'points_line_chart': 'line',
    'stacked_area_line_chart': 'line',
    'stacked_area_custom_color_line_chart': 'line',
    'area_and_line_line_chart': 'line',
    'simple_nulls_line_chart': 'line',
    'stacked_area_nulls_line_chart': 'line',
    'dash_pattern_line_chart': 'line',

    // scatter plot
    'simple_scatter_plot_chart': 'scatter_plot',
    'shapes_scatter_plot_chart': 'scatter_plot',
    'comparison_points_scatter_plot_chart': 'scatter_plot',
    'bucketing_axis_scatter_plot_chart': 'scatter_plot',

    // combo
    'ordinal_bar_line_combo_chart': 'combo',
    'numeric_line_bar_combo_chart': 'combo',
    'numeric_line_point_combo_chart': 'combo',
    'date_time_line_point_combo_chart': 'combo',
    'scatter_plot_line_combo_chart': 'combo',

    // pie
    'simple_pie_chart': 'pie',
    'inside_label_pie_chart': 'pie',
    'partial_pie_chart': 'pie',
    'donut_pie_chart': 'pie',
    'auto_label_pie_chart': 'pie',
    'gauge_pie_chart': 'pie',

    // axis
    'bar_secondary_axis': 'axis',
    'bar_second_axis_only': 'axis',
    'horizontal_bar_secondary_axis': 'axis',
    'flipped_vertical_axis': 'axis',
    'short_tick_length_axis': 'axis',
    'custom_font_size_and_color': 'axis',
    'measure_axis_label_alignment': 'axis',
    'hidden_ticks_and_labels': 'axis',
    'custom_axis_tick_formatters': 'axis',
    'custom_measure_tick_count': 'axis',
    'integer_only_measure_axis': 'axis',
    'nonzero_bound_measure_axis': 'axis',
    'statically_provided_ticks': 'axis',
    'ordinal_initial_viewport': 'axis',
    'numeric_initial_viewport': 'axis',
    'gridline_dash_pattern': 'axis',
    'line_disjoint_axis': 'axis',

    // legend
    'simple_series_legend': 'legend',
    'series_legend_options': 'legend',
    'series_legend_with_measures': 'legend',
    'legend_custom_symbol': 'legend',
    'default_hidden_series_legend': 'legend',
    'simple_datum_legend': 'legend',
    'datum_legend_options': 'legend',
    'datum_legend_with_measures': 'legend',

    // behavior
    'initial_selection': 'behavior',
    'selection_bar_highlight': 'behavior',
    'selection_line_highlight': 'behavior',
    'selection_callback_example': 'behavior',
    'chart_title': 'behavior',
    'slider': 'behavior',
    'sliding_viewport_on_selection': 'behavior',
    'percent_of_domain': 'behavior',
    'percent_of_domain_by_category': 'behavior',
    'percent_of_series': 'behavior',
    'initial_hint_animation': 'behavior',
  };
  var futures = <Future>[];
  for (var entry in templates.entries) {
    futures.add(
      Future.microtask(
        () async => registry.setValue(
          entry.key,
          json.encode(
            await rootBundle.loadString(
              'assets/charts/${entry.value}/${entry.key}.json',
            ),
          ),
        ),
      ),
    );
  }
  await Future.wait(futures);

  var data = JsonWidgetData.fromDynamic(
      json.decode(await rootBundle.loadString('assets/pages/charts.json')))!;

  runApp(
    MaterialApp(
      debugShowCheckedModeBanner: false,
      home: JsonWidgetPage(
        data: data,
      ),
      theme: ThemeData.light(),
    ),
  );
}

class JsonWidgetPage extends StatelessWidget {
  JsonWidgetPage({
    Key? key,
    required this.data,
  }) : super(key: key);

  final JsonWidgetData data;

  @override
  Widget build(BuildContext context) => data.build(context: context);
} 

Download Details:

Author: peiffer-innovations

Source Code: https://github.com/peiffer-innovations/json_dynamic_widget_plugin_charts_flutter

#flutter #charts #json #widgets 

A plugin to the JSON Dynamic Widget Plugin Charts Flutter

Shared Widgets for Flutter Side Authentication with Serverpod

Serverpod

This package is a core part of Serverpod. For documentation, visit: https://docs.serverpod.dev.

What is Serverpod?

Serverpod is an open-source, scalable app server, written in Dart for the Flutter community. Check it out!

Serverpod.dev

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add serverpod_auth_shared_flutter

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  serverpod_auth_shared_flutter: ^0.9.8

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:serverpod_auth_shared_flutter/serverpod_auth_shared_flutter.dart'; 

Download Details:

Author: serverpod

Source Code: https://github.com/serverpod/serverpod

#flutter #widgets 

Shared Widgets for Flutter Side Authentication with Serverpod