flutter_slides 0.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 52

flutter_slides #

A package to create presentations in Flutter for desktop.

0.0.1 - 04-12-2019 #

  • Initial release with the basic package.

0.0.2 - 04-12-2019 #

  • Auto-format to improve package health.
  • Downgrade Dart version to 2.5.0.

0.0.3 - 04-12-2019 #

  • Change SlideProvider to use inheritFromWidgetOfExactType as it is not deprecated yet on stable channel.

0.0.4 - 04-12-2019 #

  • Fix typos.

0.0.5 - 07-12-2019 #

  • Add Windows support.
  • Remove SlideSwipeBehavior, allowing both behaviors simultaneously.
  • Add SlideKeys to map next and previous keys for each platform.

0.0.6 - 08-12-2019 #

  • Expose titleFontSize on SlideBase.
  • Add condition to allow a slide without body when bodyFlex = 0 is passed on the slide's constructor.

0.0.7 - 08-12-2019 #

  • Change return type of title in SlideBase to allow users to create any kind of widget.
  • Expose SlideTitle to keep accessible the old title widget.

0.0.8 - 08-12-2019 #

  • Create SlideTransitionType to set the transition for each slide.

0.0.9 - 18-12-2019 #

  • Add WEB support (thanks to @marceloneppel).

0.0.10 - 03-03-2020 #

  • Change Navigator.isInitialRoute to window.defaultRouteName due to the removal of the property on the new Navigator 2.0.

0.1.0 - 07-03-2020 #

  • Bump dart to 2.6.0.
  • Fix deprecated inheritFromWidgetOfExactType.
  • Fix typo on SlideTransitionRoute file name.

0.1.1 - 09-03-2020 #

  • Fix deprecated TextTheme on example app.
  • Expose currentSlideIndex to build slide counter.

0.2.0 - 09-03-2020 #

  • [BREAKING] Make currentSlideIndex available on background method of SlideBase alongside with slidesCount, so users can build a counter.

example/lib/main.dart

import 'dart:io';

import 'package:example/slides/third_slide.dart';
import 'package:example/slides/second_slide.dart';
import 'package:flutter_slides/flutter_slides.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:example/slides/first_slide.dart';

void main() {
  _enablePlatformOverrideForDesktop();

  final slides = _getSlides();
  final sliderManager = SlideManager(slides);

  runApp(MyApp(slides, sliderManager));
}

void _enablePlatformOverrideForDesktop() {
  if (!kIsWeb && (Platform.isWindows || Platform.isLinux)) {
    debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia;
  }
}

List<Slide> _getSlides() {
  return [
    Slide(route: FirstSlide()),
    Slide(route: SecondSlide()),
    Slide(route: ThirdSlide()),
  ];
}

class MyApp extends StatelessWidget {
  final List<Slide> slides;
  final SlideManager sliderManager;

  const MyApp(this.slides, this.sliderManager);

  @override
  Widget build(BuildContext context) {
    return SlideProvider(
      manager: sliderManager,
      child: MaterialApp(
        debugShowCheckedModeBanner: false,
        theme: ThemeData(primarySwatch: Colors.orange),
        home: slides[0].route,
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_slides: ^0.2.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_slides/flutter_slides.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
4
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
52
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.9+1
  • Flutter: 1.17.3

Analysis suggestions

Package not compatible with SDK dart

because of import path [flutter_slides]

Package not compatible with runtime flutter-web of web

Because of the import of dart:io via the import chain package:flutter_slides/flutter_slides.dart->package:flutter_slides/src/slide_base.dart->package:flutter_slides/src/slide_presenter.dart->package:flutter_slides/src/slide_listener.dart->dart:io

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.0
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test