Skip to content

Commit

Permalink
* migrate to android V2 embedding
Browse files Browse the repository at this point in the history
* add documentation for all the clippers
* breaking changes:-
    - clippers are moved from Clippers folder to clippers folder
    - message clippers are moved from MessageClippers folder to message_clippers folder
    - all the clippers are now part of custom_clippers.dart
    - now only custom_clippers file can be imported
* flutter version updated to 3.0.1
* latest dart sdk is used
* add flutter lints
  • Loading branch information
jagrit-idc committed May 29, 2022
1 parent 74df554 commit af71d34
Show file tree
Hide file tree
Showing 25 changed files with 543 additions and 311 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## [2.0.0] - 2022-05-29
* migrate to android V2 embedding
* add documentation for all the clippers
* breaking changes:-
- clippers are moved from Clippers folder to clippers folder
- message clippers are moved from MessageClippers folder to message_clippers folder
- all the clippers are now part of custom_clippers.dart
- now only custom_clippers file can be imported
* flutter version updated to 3.0.1
* latest dart sdk is used
* add flutter lints

## [1.0.0] - 2021-03-17

* migrate to null safety
Expand Down
20 changes: 20 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="example"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
4 changes: 2 additions & 2 deletions example/lib/container_to_clip.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';

class ContainerToClip extends StatelessWidget {
ContainerToClip(this.color, this.text);

final Color color;
final String text;

ContainerToClip(this.color, this.text);

@override
Widget build(BuildContext context) {
return Container(
Expand Down
95 changes: 48 additions & 47 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:custom_clippers/custom_clippers.dart';
import 'package:flutter/material.dart';

import 'container_to_clip.dart';

void main() {
Expand All @@ -22,7 +23,7 @@ class MyApp extends StatelessWidget {
}

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

final String title;

Expand All @@ -39,9 +40,9 @@ class _ClippersPageState extends State<ClippersPage> {
padding: EdgeInsets.all(20),
physics: BouncingScrollPhysics(),
children: [
///Multiple Points Clipper bottom only with height of points as 50
/// Multiple Points Clipper bottom only with height of points as 50
ClipPath(
clipper: MultiplePointsClipper(Sides.BOTTOM, heightOfPoint: 50),
clipper: MultiplePointsClipper(Sides.bottom, heightOfPoint: 50),
child: ContainerToClip(
Colors.red,
'Multiple Points Clipper Bottom Only',
Expand All @@ -50,9 +51,9 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Multiple Points Clipper vertical with number of points as 50
/// Multiple Points Clipper vertical with number of points as 50
ClipPath(
clipper: MultiplePointsClipper(Sides.VERTICAL, numberOfPoints: 50),
clipper: MultiplePointsClipper(Sides.vertical, numberOfPoints: 50),
child: ContainerToClip(
Colors.green,
'Multiple Points Clipper Vertical',
Expand All @@ -61,10 +62,10 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Multiple Rounded Points Clipper bottom only with number of points as 30
/// Multiple Rounded Points Clipper bottom only with number of points as 30
ClipPath(
clipper:
MultipleRoundedPointsClipper(Sides.BOTTOM, numberOfPoints: 30),
MultipleRoundedPointsClipper(Sides.bottom, numberOfPoints: 30),
child: ContainerToClip(
Colors.blue,
'Multiple Points Rounded Clipper Bottom Only',
Expand All @@ -73,10 +74,10 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Multiple Rounded Points Clipper vertical with height of points as 50
/// Multiple Rounded Points Clipper vertical with height of points as 50
ClipPath(
clipper:
MultipleRoundedPointsClipper(Sides.VERTICAL, heightOfPoint: 50),
MultipleRoundedPointsClipper(Sides.vertical, heightOfPoint: 50),
child: ContainerToClip(
Colors.yellow,
'Multiple Rounded Points Clipper Vertical',
Expand All @@ -85,7 +86,7 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Ticket Pass Clipper
/// Ticket Pass Clipper
ClipPath(
clipper: TicketPassClipper(),
child: ContainerToClip(
Expand All @@ -96,7 +97,7 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Ticket Pass Clipper with position as 80 and hole radius as 40
/// Ticket Pass Clipper with position as 80 and hole radius as 40
ClipPath(
clipper: TicketPassClipper(position: 80, holeRadius: 40),
child: ContainerToClip(
Expand All @@ -107,7 +108,7 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Directional Wave Clipper
/// Directional Wave Clipper
ClipPath(
clipper: DirectionalWaveClipper(),
child: ContainerToClip(
Expand All @@ -118,10 +119,10 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Directional Wave Clipper with vertical position as VerticalPosition.TOP
/// Directional Wave Clipper with vertical position as VerticalPosition.TOP
ClipPath(
clipper:
DirectionalWaveClipper(verticalPosition: VerticalPosition.TOP),
DirectionalWaveClipper(verticalPosition: VerticalPosition.top),
child: ContainerToClip(
Colors.yellow,
'Directional Wave Clipper Top Left',
Expand All @@ -130,10 +131,10 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Directional Wave Clipper with horizontal position as HorizontalPosition.RIGHT
/// Directional Wave Clipper with horizontal position as HorizontalPosition.RIGHT
ClipPath(
clipper: DirectionalWaveClipper(
horizontalPosition: HorizontalPosition.RIGHT),
horizontalPosition: HorizontalPosition.right),
child: ContainerToClip(
Colors.red,
'Directional Wave Clipper Bottom Right',
Expand All @@ -142,11 +143,11 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Directional Wave Clipper with vertical position as VerticalPosition.TOP and horizontal position as HorizontalPosition.RIGHT
/// Directional Wave Clipper with vertical position as VerticalPosition.TOP and horizontal position as HorizontalPosition.RIGHT
ClipPath(
clipper: DirectionalWaveClipper(
verticalPosition: VerticalPosition.TOP,
horizontalPosition: HorizontalPosition.RIGHT),
verticalPosition: VerticalPosition.top,
horizontalPosition: HorizontalPosition.right),
child: ContainerToClip(
Colors.green,
'Directional Wave Clipper Top Right',
Expand All @@ -155,7 +156,7 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Sin Cosine Wave Clipper
/// Sin Cosine Wave Clipper
ClipPath(
clipper: SinCosineWaveClipper(),
child: ContainerToClip(
Expand All @@ -166,10 +167,10 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Sin Cosine Wave Clipper with vertical position as VerticalPosition.TOP
/// Sin Cosine Wave Clipper with vertical position as VerticalPosition.TOP
ClipPath(
clipper:
SinCosineWaveClipper(verticalPosition: VerticalPosition.TOP),
SinCosineWaveClipper(verticalPosition: VerticalPosition.top),
child: ContainerToClip(
Colors.yellow,
'Sin Cosine Wave Clipper Top Left',
Expand All @@ -178,10 +179,10 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Sin Cosine Wave with horizontal position as HorizontalPosition.RIGHT
/// Sin Cosine Wave with horizontal position as HorizontalPosition.RIGHT
ClipPath(
clipper: SinCosineWaveClipper(
horizontalPosition: HorizontalPosition.RIGHT),
horizontalPosition: HorizontalPosition.right),
child: ContainerToClip(
Colors.red,
'Sin Cosine Wave Clipper Bottom Right',
Expand All @@ -190,11 +191,11 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Sin Cosine Wave Clipper with vertical position as VerticalPosition.TOP and horizontal position as HorizontalPosition.RIGHT
/// Sin Cosine Wave Clipper with vertical position as VerticalPosition.TOP and horizontal position as HorizontalPosition.RIGHT
ClipPath(
clipper: SinCosineWaveClipper(
verticalPosition: VerticalPosition.TOP,
horizontalPosition: HorizontalPosition.RIGHT),
verticalPosition: VerticalPosition.top,
horizontalPosition: HorizontalPosition.right),
child: ContainerToClip(
Colors.green,
'Sin Cosine Wave Clipper Top Right',
Expand All @@ -203,9 +204,9 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Three Rounded Edges Message Clipper Sender Side
/// Three Rounded Edges Message Clipper Sender Side
ClipPath(
clipper: ThreeRoundedEdgesMessageClipper(MessageType.SEND),
clipper: ThreeRoundedEdgesMessageClipper(MessageType.send),
child: ContainerToClip(
Colors.blue,
'Three Rounded Edges Message Clipper Sender',
Expand All @@ -214,9 +215,9 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Three Rounded Edges Message Clipper Receiver Side
/// Three Rounded Edges Message Clipper Receiver Side
ClipPath(
clipper: ThreeRoundedEdgesMessageClipper(MessageType.RECEIVE),
clipper: ThreeRoundedEdgesMessageClipper(MessageType.receive),
child: ContainerToClip(
Colors.yellow,
'Three Rounded Edges Message Clipper Receiver',
Expand All @@ -225,9 +226,9 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Diagonal Rounded Edges Message Clipper Sender Side
/// Diagonal Rounded Edges Message Clipper Sender Side
ClipPath(
clipper: DiagonalRoundedEdgesMessageClipper(MessageType.SEND),
clipper: DiagonalRoundedEdgesMessageClipper(MessageType.send),
child: ContainerToClip(
Colors.red,
'Diagonal Rounded Edges Message Clipper Sender',
Expand All @@ -236,9 +237,9 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Diagonal Rounded Edges Message Clipper Receiver Side
/// Diagonal Rounded Edges Message Clipper Receiver Side
ClipPath(
clipper: DiagonalRoundedEdgesMessageClipper(MessageType.RECEIVE),
clipper: DiagonalRoundedEdgesMessageClipper(MessageType.receive),
child: ContainerToClip(
Colors.green,
'Diagonal Rounded Edges Message Clipper Receiver',
Expand All @@ -247,9 +248,9 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Lower Nip Message Clipper Sender Side
/// Lower Nip Message Clipper Sender Side
ClipPath(
clipper: LowerNipMessageClipper(MessageType.SEND),
clipper: LowerNipMessageClipper(MessageType.send),
child: ContainerToClip(
Colors.blue,
'Lower Nip Message Clipper Sender',
Expand All @@ -258,9 +259,9 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Lower Nip Message Clipper Receiver Side
/// Lower Nip Message Clipper Receiver Side
ClipPath(
clipper: LowerNipMessageClipper(MessageType.RECEIVE),
clipper: LowerNipMessageClipper(MessageType.receive),
child: ContainerToClip(
Colors.yellow,
'Lower Nip Message Clipper Receiver',
Expand All @@ -269,9 +270,9 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Upper Nip Message Clipper Sender Side
/// Upper Nip Message Clipper Sender Side
ClipPath(
clipper: UpperNipMessageClipper(MessageType.SEND),
clipper: UpperNipMessageClipper(MessageType.send),
child: ContainerToClip(
Colors.red,
'Upper Nip Message Clipper Sender',
Expand All @@ -280,9 +281,9 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Upper Nip Message Clipper Receiver Side
/// Upper Nip Message Clipper Receiver Side
ClipPath(
clipper: UpperNipMessageClipper(MessageType.RECEIVE),
clipper: UpperNipMessageClipper(MessageType.receive),
child: ContainerToClip(
Colors.green,
'Upper Nip Message Clipper Receiver',
Expand All @@ -291,9 +292,9 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Upper Nip Message Clipper Two Sender Side
/// Upper Nip Message Clipper Two Sender Side
ClipPath(
clipper: UpperNipMessageClipperTwo(MessageType.SEND),
clipper: UpperNipMessageClipperTwo(MessageType.send),
child: ContainerToClip(
Colors.blue,
'Upper Nip Message Clipper Two Sender',
Expand All @@ -302,9 +303,9 @@ class _ClippersPageState extends State<ClippersPage> {

SizedBox(height: 20),

///Upper Nip Message Clipper Two Receiver Side
/// Upper Nip Message Clipper Two Receiver Side
ClipPath(
clipper: UpperNipMessageClipperTwo(MessageType.RECEIVE),
clipper: UpperNipMessageClipperTwo(MessageType.receive),
child: ContainerToClip(
Colors.yellow,
'Upper Nip Message Clipper Two Receiver',
Expand Down
Loading

0 comments on commit af71d34

Please sign in to comment.