dashed_line 0.1.0+3 copy "dashed_line: ^0.1.0+3" to clipboard
dashed_line: ^0.1.0+3 copied to clipboard

Draw dashed lines with any shape and style you want. Just like that.

example/lib/main.dart

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

void main() => runApp(const MaterialApp(home: HomeScreen()));

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

  @override
  Widget build(BuildContext context) {
    final path = Path()..cubicTo(-40, 53, 14, 86, 61, 102);

    return Scaffold(
      appBar: AppBar(
        title: const Text('dashed_line example'),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {},
        child: const Icon(Icons.celebration),
      ),
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: [
          const Spacer(),
          Text(
            'Click me!',
            textAlign: TextAlign.center,
            style: Theme.of(context).textTheme.headline4,
          ),
          Expanded(
            child: Padding(
              padding: const EdgeInsets.fromLTRB(72, 0, 72, 64),
              child: DashedLine(
                path: path,
                color: Theme.of(context).textTheme.headline4!.color!,
              ),
            ),
          ),
        ],
      ),
    );
  }
}
66
likes
140
pub points
84%
popularity

Publisher

verified publisherleancode.co

Draw dashed lines with any shape and style you want. Just like that.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter, svg_path_parser

More

Packages that depend on dashed_line