Skip to content

Commit

Permalink
remove references to previous package name
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelCharles committed Jan 21, 2020
1 parent 533ab2a commit 9950c17
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## [0.0.1] - TODO: Add release date.
## [0.1.1] - January 21, 2020

* TODO: Describe initial release.
* Initial release.
8 changes: 7 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
TODO: Add your license here.
Copyright 2020 Michael Charles Aubrey

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 changes: 17 additions & 14 deletions lib/clay_containers.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library neumorphic_containers;
library clay_containers;

import 'package:flutter/material.dart';

Expand All @@ -14,11 +14,21 @@ class ClayContainer extends StatelessWidget {
final int depth;

ClayContainer(
{this.child, this.height, this.width, @required this.color, this.spread, this.borderRadius, this.customBorderRadius, this.curveType, this.depth});
{this.child,
this.height,
this.width,
@required this.color,
this.spread,
this.borderRadius,
this.customBorderRadius,
this.curveType,
this.depth});

Color _getAdjustColor(Color baseColor, amount) {
Map colors = {
"red": baseColor.red, "green": baseColor.green, "blue": baseColor.blue
"red": baseColor.red,
"green": baseColor.green,
"blue": baseColor.blue
};
colors = colors.map((key, value) {
int result = 0;
Expand Down Expand Up @@ -64,9 +74,8 @@ class ClayContainer extends StatelessWidget {
if (customBorderRadius != null) {
borderRadiusValue = customBorderRadius;
}
final CurveType curveTypeValue = curveType == null
? CurveType.none
: curveType;
final CurveType curveTypeValue =
curveType == null ? CurveType.none : curveType;

List<Color> gradientColors;
switch (curveTypeValue) {
Expand All @@ -81,7 +90,6 @@ class ClayContainer extends StatelessWidget {
break;
}


return Container(
height: heightValue,
width: widthValue,
Expand All @@ -102,14 +110,9 @@ class ClayContainer extends StatelessWidget {
color: _getAdjustColor(colorValue, 0 - depthValue),
offset: Offset(spreadValue, spreadValue),
blurRadius: spreadValue)
]
),
]),
);
}
}

enum CurveType {
concave,
convex,
none
}
enum CurveType { concave, convex, none }
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: clay_containers
description: Easily create custom neumorphic container widgets for your own unique design.
version: 0.1.1
author: Michael Charles Aubrey
homepage: https://michaelcharl.es

environment:
Expand Down
3 changes: 2 additions & 1 deletion test/clay_containers.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:neumorphic_containers/clay_containers.dart';

import '../lib/clay_containers.dart';

void main() {
testWidgets('ClayContainer can have a child.', (WidgetTester tester) async {
Expand Down

0 comments on commit 9950c17

Please sign in to comment.