dart_code_viewer 0.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 53

dart_code_viewer #

The dart_code_viewer package for Flutter allows you to easily show and copy dart code in your Flutter application.

Getting Started #

Dart Code Viewer Example in light and dark Theme Mode.

With the dart_code_viewer package, you can show Dart code in a Flutter application. The dart_code_viewer is documented well and uses Flutters pattern with Theming.

The code viewer can be used to display dart code. By default the DartCodeViewer gives you a Theme based code view. If you are using a ThemeMode that is light than you will get the light option. Note that the default background of the code viewer is based off ColorScheme.background.

The code viewer requieres a non-null data String as required input.

The DartCodeViewer requires one of its ancestors to be a Material widget. This is because the code viewer uses the MediaQuery widget. Which is typically introduced by the [MaterialApp] or [WidgetsApp] widget at the top of your application widget tree.

To use dart_code_viewer first you must add the 'dart_code_viewer' package to your oubspec dependencies

To import DartCodeViewer;

import 'package:dart_code_viewer/dart_code_viewer.dart';

To use DartCodeViewer with the default DartCodeViewer:

DartCodeViewer(r'''
void main() {
  runApp(MyApp());
}
'''
),

''' is a handy dart pattern that lets you read multiple string as once instead. Which is really useful if you want to import your dart code as a String like this.

By simply using the code above you will get the example shown in the GIF.

You can also customize the theming of the DartCodeViewer by using its parameters:

DartCodeViewer(r'''
void main() {
  runApp(MyApp());
}
''',
  backgroundColor: GoogleFonts.robotoMono().copyWith(color: Colors.pink),
),

This will change the background color of the CodeViewer to Pink.

You can use this Code viewer tool to choose the color for each different highlighted token style. On the left side you put your example code and on the right you can choose the colors you want the code viewer to display. Below is a table that shows you the difference between the code viewer tool and the dart code viewer parameter.

Code Viewer ToolDart Code Viewer Parameter
backgroundbackgroundColor
plain textbaseStyle
PunctuationpunctuationStyle
String, valuesstringStyle
Keywords, tagskeywordStyle
CommentscommentStyle
TypesclassStyle
NumbersnumberStyle

You can use DartCodeViewer other constructor DartCodeViewer.textColor to change the color properties instead of the TextStyles. You can also set the TextStyle incase you don't want to use the default textStlye RobotoMono. Here is an example on how you can use this constructor:

DartCodeViewer.textColor(r'''
void main() {
  runApp(MyApp());
}
''',
  textStyle: GoogleFonts.lato(),
  commentColor: Colors.grey,
  baseColor: Colors.pink,
),

In the case above we are using the text style lato and we are changeing the default colors for comment and base color to grey and pink respectively.

If you are having a hard time figuering out how to choose the Color for this tool. There are a few default DartCodeViewers at your disposal. Here are the code viewers that are well known:

  • DartCodeViewer.light
  • DartCodeViewer.lightAlt
  • DartCodeViewer.dark
  • DartCodeViewer.darkAlt
  • DartCodeViewer.designDark
  • DartCodeViewer.io17
  • DartCodeViewer.io19
  • DartCodeViewer.flutterInteract2019

Here is an example on how to use these themed code viewers.

DartCodeViewer.designDark(r'''
void main() {
  runApp(MyApp());
}
''',
),

The DartCodeViewer can also be themed identical to how widgets in the material package get themed. You can theme the code viewer by having an ancestor of DartCodeViewerTheme. The dart code viewer theme describes the color, size, and text styles for the dart code viewer it is attached to.

Descendant widget obtains the current theme's DartCodeViewerThemeData object using DartCodeViewerTheme.of. When a widget uses DartCodeViewerTheme.of, it is automatically rebuilt if the theme later changes.

Using the DartCodeViewerThemeData returns the data from the closest DartCodeViewerTheme instances the encloses the given context. The default parameters is set within the DartCodeViewer.

DartCodeViewerThemeData holds the color, size, and text styles for a dart code viewer theme. Use this class to configure a [DartCodeViewerThemeData] widget. To obtain the current ambient dart code viewer theme, use [DartCodeViewerTheme.of].

The simplest way to create a DartCodeThemeData is to use the [copyWith] on the one you get from [DartCodeViewerTheme.of], or create an entirely new one with [DartCodeViewerThemeData].

Here is an example below:

DartCodeViewerTheme(
  data: DartCodeViewerThemeData(
    backgroundColor: Colors.pink,
    copyButtonText: Text('Copiar'),
  ),
  child: DartCodeViewer.textColor(r'''
void main() {
  runApp(MyApp());
}
''',
  textStyle: GoogleFonts.lato(),
  commentColor: Colors.grey,
  baseColor: Colors.pink,
  ),
),

You can use this Code viewer tool to help you with Theming. On the left side you put your example code and on the right you can choose the colors you want the code viewer to display. Below is a table that shows you the difference between the code viewer tool and the dart code viewer parameter.

Code Viewer ToolDart Code Viewer Parameter
backgroundbackgroundColor
plain textbaseStyle
PunctuationpunctuationStyle
String, valuesstringStyle
Keywords, tagskeywordStyle
CommentscommentStyle
TypesclassStyle
NumbersnumberStyle

[0.0.1] - 2020-05-22 #

The initial release has DartCodeViewer, DartCodeViewerTheme, and DartCodeViewerThemeData.

The code viewer for the dart language. The code viewer can be used to display dart code. By default the [DartCodeViewer] gives you a Theme based code view. If you are using a [ThemeMode] that is light than you will get the light option. Note that the default background of the code viewer is based off [ColorScheme.background].

Supplying a non-null [data] String is required as input.

Requires one of its ancestors to be a [Material] widget.

Requires one of its ancestors to be a [MediaQuery] widget. Typically, these are introduced by the [MaterialApp] or [WidgetsApp] widget at the top of your application widget tree.

String is codified and split into tokens. Depending on the token produced the TextSpan will be a different color. This is based of the flutter gallery. You can find code source here

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        backgroundColor: Colors.white,
      ),
      darkTheme: ThemeData(
        backgroundColor: Colors.black,
      ),
      home: Scaffold(
        appBar: AppBar(title: Text('Dart Code Viewer Example')),
        body: DartCodeViewer(r'''

import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';
import 'dart_code_viewer_theme.dart';
import 'prehighlighter.dart';

class DartCodeViewer extends StatelessWidget {
  const DartCodeViewer(
    this.data, {
    Key key,
    this.baseStyle,
    this.classStyle,
    this.commentStyle,
    this.constantStyle,
    this.keywordStyle,
    this.numberStyle,
    this.punctuationStyle,
    this.stringStyle,
    this.backgroundColor,
    this.copyButtonText,
    this.showCopyButton,
    this.height,
    this.width,
  }) : assert(data != null, 'A non-null String must be provided to a DartCodeViewer widget.'),
      super(key: key);

  factory DartCodeViewer.textColor(
    String data, {
    TextStyle textStyle,
    Color baseColor,
    Color classColor,
    Color commentColor,
    Color constantColor,
    Color keywordColor,
    Color numberColor,
    Color punctuationColor,
    Color stringColor,
    Color backgroundColor,
    Text copyButtonText,
    bool showCopyButton,
    double height,
    double width,
  }) {
    TextStyle _defaultCodeStyle = textStyle ?? GoogleFonts.robotoMono(fontSize: 12);
    return DartCodeViewer(
      data,
      baseStyle: _defaultCodeStyle.copyWith(color: baseColor),
      classStyle: _defaultCodeStyle.copyWith(color: classColor),
      commentStyle: _defaultCodeStyle.copyWith(color: commentColor),
      constantStyle: _defaultCodeStyle.copyWith(color: constantColor),
      keywordStyle: _defaultCodeStyle.copyWith(color: keywordColor),
      numberStyle: _defaultCodeStyle.copyWith(color: numberColor),
      punctuationStyle: _defaultCodeStyle.copyWith(color: punctuationColor),
      stringStyle: _defaultCodeStyle.copyWith(color: stringColor),
      backgroundColor: backgroundColor,
      copyButtonText: copyButtonText,
      showCopyButton: showCopyButton,
      height: height,
      width: width,
    );
  }

  factory DartCodeViewer.light(String data) {
    return DartCodeViewer.textColor(
      data,
      baseColor: Colors.blueGrey.shade100,
      classColor: Colors.purple.shade500,
      commentColor: Colors.pink.shade600,
      constantColor: Colors.indigo.shade50,
      keywordColor: Colors.indigo.shade500,
      numberColor: Colors.red.shade700,
      punctuationColor: Colors.blueGrey.shade800,
      stringColor: Colors.green.shade700,
      backgroundColor: Colors.grey.shade100,
    );
  }

  factory DartCodeViewer.lightAlt(String data) {
    return DartCodeViewer.textColor(
      data,
      baseColor: Colors.black,
      classColor: Color(0xFF673AB7),
      commentColor: Color(0xFF999999),
      constantColor: Color(0xFFE67C73),
      keywordColor: Color(0xFF4285F4),
      numberColor: Color(0xFFDB4437),
      punctuationColor: Color(0xFFA3A3A3),
      stringColor: Color(0xFF0F9D58),
      backgroundColor: Color(0xFFEEEEEE),
    );
  }

  factory DartCodeViewer.dark(String data) {
    return DartCodeViewer.textColor(
      data,
      baseColor: Colors.blueGrey.shade50,
      classColor: Colors.purple.shade200,
      commentColor: Colors.pink.shade300,
      constantColor: Colors.yellow.shade700,
      keywordColor: Colors.cyan.shade300,
      numberColor: Colors.yellow.shade700,
      punctuationColor: Colors.blueGrey.shade50,
      stringColor: Colors.lightGreen.shade400,
      backgroundColor: Colors.grey.shade900,
    );
  }

  factory DartCodeViewer.darkAlt(String data) {
    return DartCodeViewer.textColor(
      data,
      baseColor: Colors.white,
      classColor: Color(0xFFFF8A65),
      commentColor: Color(0xFFAAAAAA),
      constantColor: Color(0xFFE67C73),
      keywordColor: Color(0xFF7BAAF7),
      numberColor: Color(0xFFF4B400),
      punctuationColor: Color(0xFFA3A3A3),
      stringColor: Color(0xFF57BB8A),
      backgroundColor: Color(0xFF000000),
    );
  }

  factory DartCodeViewer.designDark(String data) {
    return DartCodeViewer.textColor(
      data,
      baseColor: Colors.white,
      classColor: Color(0xFFFF8A80),
      commentColor: Color(0xFF607D8B),
      constantColor: Color(0xFF90A4AE),
      keywordColor: Color(0xFF26C6DA),
      numberColor: Color(0xFFFFBC00),
      punctuationColor: Color(0xFF90A4AE),
      stringColor: Color(0xFF00BFA4),
      backgroundColor: Color(0xFF263238),
    );
  }

  factory DartCodeViewer.io17(String data) {
    return DartCodeViewer.textColor(
      data,
      baseColor: Colors.white,
      classColor: Color(0xFFFF8857),
      commentColor: Color(0xFFFF5CB4),
      constantColor: Color(0xFF90A4AE),
      keywordColor: Color(0xFF00E4FF),
      numberColor: Color(0xFFFFD500),
      punctuationColor: Color(0xFF90A4AE),
      stringColor: Color(0xFF1CE8b5),
      backgroundColor: Color(0xFF263238),
    );
  }

  factory DartCodeViewer.io19(String data) {
    return DartCodeViewer.textColor(
      data,
      baseColor: Colors.white,
      classColor: Color(0xFFEE675C),
      commentColor: Color(0xFF9AA0A6),
      constantColor: Color(0xFFFCC934),
      keywordColor: Color(0xFF669DF6),
      numberColor: Color(0xFFFCC934),
      punctuationColor: Color(0xFF9AA0A6),
      stringColor: Color(0xFF5BB974),
      backgroundColor: Color(0xFF202124),
    );
  }

  factory DartCodeViewer.flutterInteract19(String data) {
    return DartCodeViewer.textColor(
      data,
      baseColor: Color(0xFFFAFBFB),
      classColor: Color(0xFFD65BAD),
      commentColor: Color(0xFF808080),
      constantColor: Color(0xFFFF8383),
      keywordColor: Color(0xFF1CDEC9),
      numberColor: Color(0xFFBD93F9),
      punctuationColor: Color(0xFF8BE9FD),
      stringColor: Color(0xFFffa65c),
      backgroundColor: Color(0xFF241e30),
    );
  }

  final TextStyle baseStyle;
  final TextStyle classStyle;
  final TextStyle commentStyle;
  final TextStyle constantStyle;
  final TextStyle keywordStyle;
  final TextStyle numberStyle;
  final TextStyle punctuationStyle;
  final TextStyle stringStyle;
  final String data;

  final Color backgroundColor;
  final Text copyButtonText;
  final bool showCopyButton;

  final double height;
  final double width;

  @override
  Widget build(BuildContext context) {
    final codeTextStyle = GoogleFonts.robotoMono(
        fontSize: 12 * MediaQuery.of(context).textScaleFactor,
    );

    /// Uses device brightness to choose what type of theme to return.
    final brightness = WidgetsBinding.instance.window.platformBrightness;
    bool lightModeOn = brightness == Brightness.light;

    TextStyle _defaultBaseStyle = codeTextStyle.copyWith(
      color: lightModeOn ? Colors.blueGrey.shade100 : Colors.blueGrey.shade50
    );
    TextStyle _defaultClassStyle = codeTextStyle.copyWith(
      color: lightModeOn ? Colors.purple.shade500 : Colors.purple.shade200
    );
    TextStyle _defaultCommentStyle = codeTextStyle.copyWith(
      color: lightModeOn ? Colors.pink.shade600 : Colors.pink.shade300
    );
    TextStyle _defaultConstantStyle = codeTextStyle.copyWith(
      color: lightModeOn ? Colors.indigo.shade50 : Colors.yellow.shade700
    );
    TextStyle _defaultKeywordStyle = codeTextStyle.copyWith(
      color: lightModeOn ? Colors.indigo.shade500 : Colors.cyan.shade300
    );
    TextStyle _defaultNumberStyle = codeTextStyle.copyWith(
      color: lightModeOn ? Colors.red.shade700 : Colors.yellow.shade700
    );
    TextStyle _defaultPunctuationalStyle = codeTextStyle.copyWith(
      color: lightModeOn ? Colors.blueGrey.shade800 : Colors.blueGrey.shade50
    );
    TextStyle _defaultStringStyle = codeTextStyle.copyWith(
      color: lightModeOn ? Colors.green.shade700 : Colors.lightGreen.shade400
    );

    Text _defaultCopyButtonText = Text(''
      'COPY ALL',
      style: Theme.of(context).textTheme.button.copyWith(
        color: Colors.white,
        fontWeight: FontWeight.w500,
      ),
    );
    bool _defaultShowCopyButton = true;

    DartCodeViewerThemeData dartCodeViewerThemeData = DartCodeViewerTheme.of(context);
    dartCodeViewerThemeData = dartCodeViewerThemeData.copyWith(
      baseStyle: baseStyle ?? dartCodeViewerThemeData.baseStyle ?? _defaultBaseStyle,
      classStyle: classStyle ?? dartCodeViewerThemeData.classStyle ?? _defaultClassStyle,
      commentStyle: commentStyle ?? dartCodeViewerThemeData.commentStyle ?? _defaultCommentStyle,
      constantStyle: constantStyle ?? dartCodeViewerThemeData.constantStyle ?? _defaultConstantStyle,
      keywordStyle: keywordStyle ?? dartCodeViewerThemeData.keywordStyle ?? _defaultKeywordStyle,
      numberStyle: numberStyle ?? dartCodeViewerThemeData.numberStyle ?? _defaultNumberStyle,
      punctuationStyle: punctuationStyle ?? dartCodeViewerThemeData.punctuationStyle ?? _defaultPunctuationalStyle,
      stringStyle: stringStyle ?? dartCodeViewerThemeData.stringStyle ?? _defaultStringStyle,
      backgroundColor: backgroundColor ?? dartCodeViewerThemeData.backgroundColor ?? Theme.of(context).colorScheme.background,
      copyButtonText: copyButtonText ?? dartCodeViewerThemeData.copyButtonText ?? _defaultCopyButtonText,
      showCopyButton: showCopyButton ?? dartCodeViewerThemeData.showCopyButton ?? _defaultShowCopyButton,
      height: height ?? dartCodeViewerThemeData.height ?? MediaQuery.of(context).size.height,
      width: width ?? dartCodeViewerThemeData.width ?? MediaQuery.of(context).size.width,
    );

    return DartCodeViewerTheme(
      data: dartCodeViewerThemeData,
      child: Container(
        color: dartCodeViewerThemeData.backgroundColor,
        padding: const EdgeInsets.symmetric(horizontal: 16),
        height: dartCodeViewerThemeData.height,
        width: dartCodeViewerThemeData.width,
        child: _DartCodeViewerPage(
          codifyString(data, dartCodeViewerThemeData),
        ),
      ),
    );
  }

  InlineSpan codifyString(String content, DartCodeViewerThemeData dartCodeViewerThemeData) {
    List<TextSpan> textSpans = [];
    final codeSpans = DartSyntaxPrehighlighter().format(content);
    // Converting CodeSpan to TextSpan by first converting to String and then TextSpan.
    for (final span in codeSpans) {
      textSpans.add(stringToTextSpan(span.toString(), dartCodeViewerThemeData));
    }
    return TextSpan(children: textSpans);
  }

  TextSpan stringToTextSpan(String string, DartCodeViewerThemeData dartCodeViewerThemeData) {
    return TextSpan(
      style: () {
        String styleString = RegExp(r'codeStyle.\w*').firstMatch(string).group(0);
        DartCodeViewerThemeData dartCodeViewerTheme = dartCodeViewerThemeData;

        switch (styleString) {
          case 'codeStyle.baseStyle':
            return dartCodeViewerTheme.baseStyle;
          case 'codeStyle.numberStyle':
            return dartCodeViewerTheme.numberStyle;
          case 'codeStyle.commentStyle':
            return dartCodeViewerTheme.commentStyle;
          case 'codeStyle.keywordStyle':
            return dartCodeViewerTheme.keywordStyle;
          case 'codeStyle.stringStyle':
            return dartCodeViewerTheme.stringStyle;
          case 'codeStyle.punctuationStyle':
            return dartCodeViewerTheme.punctuationStyle;
          case 'codeStyle.classStyle':
            return dartCodeViewerTheme.classStyle;
          case 'codeStyle.constantStyle':
            return dartCodeViewerTheme.constantStyle;
          default:
            return dartCodeViewerTheme.baseStyle;
        }
      }(),
      text: () {
        String textString = RegExp('\'.*\'').firstMatch(string).group(0);
        String subString = textString.substring(1, textString.length - 1);
        return decodeString(subString);
      }(),
    );
  }
}

class _DartCodeViewerPage extends StatelessWidget {
  const _DartCodeViewerPage(this.code);
  final InlineSpan code;

  @override
  Widget build(BuildContext context) {
    final _richTextCode = code;
    final _plainTextCode = _richTextCode.toPlainText();

    void _showSnackBarOnCopySuccess(dynamic result) {
      Scaffold.of(context).showSnackBar(
        SnackBar(
          content: Text('Copied to Clipboard'),
        ),
      );
    }

    void _showSnackBarOnCopyFailure(Object exception) {
      Scaffold.of(context).showSnackBar(
        SnackBar(
          content: Text('Failure to copy to clipboard: $exception'),
        ),
      );
    }

    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        if (DartCodeViewerTheme.of(context).showCopyButton)
          FlatButton(
            color: Colors.white.withOpacity(0.15),
            materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
            padding: const EdgeInsets.symmetric(horizontal: 8),
            shape: const RoundedRectangleBorder(
              borderRadius: BorderRadius.all(Radius.circular(4)),
            ),
            onPressed: () async {
              await Clipboard.setData(
                  ClipboardData(text: _plainTextCode)
              ).then(_showSnackBarOnCopySuccess)
               .catchError(_showSnackBarOnCopyFailure);
            },
            child: DartCodeViewerTheme.of(context).copyButtonText,
          ),
        Expanded(
          child: SingleChildScrollView(
            child: RichText(
              textDirection: TextDirection.ltr,
              text: _richTextCode,
            ),
          ),
        ),
      ],
    );
  }
}

      ''',
       ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  dart_code_viewer: ^0.0.1

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:dart_code_viewer/dart_code_viewer.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
15
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
76
Overall:
Weighted score of the above. [more]
53
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform android

Because:

  • package:dart_code_viewer/dart_code_viewer.dart that imports:
  • package:dart_code_viewer/src/dart_code_viewer.dart that imports:
  • package:google_fonts/google_fonts.dart that imports:
  • package:google_fonts/src/google_fonts_base.dart that imports:
  • package:path_provider/path_provider.dart that imports:
  • package:path_provider_linux/path_provider_linux.dart that declares support for platforms: linux

Package does not support Flutter platform ios

Because:

  • package:dart_code_viewer/dart_code_viewer.dart that imports:
  • package:dart_code_viewer/src/dart_code_viewer.dart that imports:
  • package:google_fonts/google_fonts.dart that imports:
  • package:google_fonts/src/google_fonts_base.dart that imports:
  • package:path_provider/path_provider.dart that imports:
  • package:path_provider_linux/path_provider_linux.dart that declares support for platforms: linux

Package does not support Flutter platform macos

Because:

  • package:dart_code_viewer/dart_code_viewer.dart that imports:
  • package:dart_code_viewer/src/dart_code_viewer.dart that imports:
  • package:google_fonts/google_fonts.dart that imports:
  • package:google_fonts/src/google_fonts_base.dart that imports:
  • package:path_provider/path_provider.dart that imports:
  • package:path_provider_linux/path_provider_linux.dart that declares support for platforms: linux

Package does not support Flutter platform web

Because:

  • package:dart_code_viewer/dart_code_viewer.dart that imports:
  • package:dart_code_viewer/src/dart_code_viewer.dart that imports:
  • package:google_fonts/google_fonts.dart that imports:
  • package:google_fonts/src/google_fonts_base.dart that imports:
  • package:path_provider/path_provider.dart that declares support for platforms: android, ios, linux, macos

Package does not support Flutter platform windows

Because:

  • package:dart_code_viewer/dart_code_viewer.dart that imports:
  • package:dart_code_viewer/src/dart_code_viewer.dart that imports:
  • package:google_fonts/google_fonts.dart that imports:
  • package:google_fonts/src/google_fonts_base.dart that imports:
  • package:path_provider/path_provider.dart that declares support for platforms: android, ios, linux, macos

Package not compatible with SDK dart

Because:

  • dart_code_viewer that is a package requiring null.

Health suggestions

Format lib/dart_code_viewer.dart.

Run flutter format to format lib/dart_code_viewer.dart.

Format lib/src/dart_code_viewer.dart.

Run flutter format to format lib/src/dart_code_viewer.dart.

Format lib/src/dart_code_viewer_theme.dart.

Run flutter format to format lib/src/dart_code_viewer_theme.dart.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (google_fonts).

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The package description is too short. (-4 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
google_fonts ^0.4.0 0.4.3 1.1.0
string_scanner ^1.0.5 1.0.5
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
convert 2.1.1
crypto 2.1.5
file 5.2.1
http 0.12.1
http_parser 3.1.4
intl 0.16.1
meta 1.1.8 1.2.2
path 1.7.0
path_provider 1.6.11
path_provider_linux 0.0.1+2
path_provider_macos 0.0.4+3
path_provider_platform_interface 1.0.2
pedantic 1.9.0 1.9.2
platform 2.2.1
plugin_platform_interface 1.0.2
process 3.0.13
sky_engine 0.0.99
source_span 1.7.0
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
xdg_directories 0.1.0
Dev dependencies
flutter_test