Skip to content

Commit

Permalink
Merge pull request #30 from JordyHers/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JordyHers committed Apr 29, 2023
2 parents d4d321f + 0b4e8ac commit 78b1550
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 30 deletions.
Binary file added images/logos.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
name: flutter_any_logo

#description of the package
description: >-
All logos are included in this package to provide the largest logo library in flutter.
It covers, fashion. Sports, Entertainment, SocialMedia etc...
#Version to be released
version: 1.0.0

#package homepage:
homepage: https://github.com/JordyHers/flutter_any_logo

#package repository
repository: https://github.com/JordyHers/flutter_any_logo

#remove that when the package is ready to be published
publish_to: none

#environment supported
environment:
sdk: '>=2.19.2 <3.0.0'
flutter: ">=2.5.0"

#screenshots
screenshots:
- description: 'This screenshot shows logos '
path: images/logos.jpeg


# dependencies
dependencies:
flutter:
sdk: flutter
Expand Down Expand Up @@ -51,4 +67,27 @@ flutter:
pluginClass: FlutterAnyLogoPluginCApi


#funding url
funding:
- https://patreon.com/user?u=91968185

#supported platforms
platforms:
android:
ios:
linux:
windows:
macos:

#licence supported
license: MIT










6 changes: 3 additions & 3 deletions test/categories/basketball_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ void main() {
testWidgets('Verify All Logos Should load', (WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.nba);
// Verify that all logo launch
final int number = LogoTest.numberOfLogos(Const.nba);
final int number = AnyLogoTest.numberOfLogos(Const.nba);
expect(find.byType(Image, skipOffstage: false), findsNWidgets(number));
});

testWidgets('Verify no exception is thrown', (WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.nba);
LogoTest.testException(tester);
AnyLogoTest.testException(tester);
});

testWidgets(
'Verify the last item displayed is the same as the last in the list',
(WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.nba);
LogoTest.testDisplayedLogos(tester, AnyLogo.nba.values);
AnyLogoTest.testDisplayedLogos(tester, AnyLogo.nba.values);
});
});
}
6 changes: 3 additions & 3 deletions test/categories/fashion_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ void main() {
testWidgets('Verify All Logos Should load', (WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.fashion);
// Verify that all logo launch
final int number = LogoTest.numberOfLogos(Const.fashion);
final int number = AnyLogoTest.numberOfLogos(Const.fashion);
expect(find.byType(Image, skipOffstage: false), findsNWidgets(number));
});

testWidgets('Verify no exception is thrown', (WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.fashion);
LogoTest.testException(tester);
AnyLogoTest.testException(tester);
});

testWidgets(
'Verify the last item displayed is the same as the last in the list',
(WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.fashion);
LogoTest.testDisplayedLogos(tester, AnyLogo.fashion.values);
AnyLogoTest.testDisplayedLogos(tester, AnyLogo.fashion.values);
});
});
}
6 changes: 3 additions & 3 deletions test/categories/football_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ void main() {
testWidgets('Verify All Logos Should load', (WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.football);
// Verify that all logo launch
final int number = LogoTest.numberOfLogos(Const.football);
final int number = AnyLogoTest.numberOfLogos(Const.football);
expect(find.byType(Image, skipOffstage: false), findsNWidgets(number));
});

testWidgets('Verify no exception is thrown', (WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.football);
LogoTest.testException(tester);
AnyLogoTest.testException(tester);
});

testWidgets(
'Verify the last item displayed is the same as the last in the list',
(WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.football);
LogoTest.testDisplayedLogos(tester, AnyLogo.uefa.values);
AnyLogoTest.testDisplayedLogos(tester, AnyLogo.uefa.values);
});
});
}
6 changes: 3 additions & 3 deletions test/categories/media_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ void main() {
testWidgets('Verify All Logos Should load', (WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.media);
// Verify that all logo launch
final int number = LogoTest.numberOfLogos(Const.media);
final int number = AnyLogoTest.numberOfLogos(Const.media);
expect(find.byType(Image, skipOffstage: false), findsNWidgets(number));
});

testWidgets('Verify no exception is thrown', (WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.media);
LogoTest.testException(tester);
AnyLogoTest.testException(tester);
});

testWidgets(
'Verify the last item displayed is the same as the last in the list',
(WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.media);
LogoTest.testDisplayedLogos(tester, AnyLogo.uefa.values);
AnyLogoTest.testDisplayedLogos(tester, AnyLogo.uefa.values);
});
});
}
6 changes: 3 additions & 3 deletions test/categories/tech_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ void main() {
testWidgets('Verify All Logos Should load', (WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.tech);
// Verify that all logo launch
final int number = LogoTest.numberOfLogos(Const.tech);
final int number = AnyLogoTest.numberOfLogos(Const.tech);
expect(find.byType(Image, skipOffstage: false), findsNWidgets(number));
});

testWidgets('Verify no exception is thrown', (WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.tech);
LogoTest.testException(tester);
AnyLogoTest.testException(tester);
});

testWidgets(
'Verify the last item displayed is the same as the last in the list',
(WidgetTester tester) async {
await tester.pumpWidget(PumpWidget.tech);
LogoTest.testDisplayedLogos(tester, AnyLogo.tech.values);
AnyLogoTest.testDisplayedLogos(tester, AnyLogo.tech.values);
});
});
}
2 changes: 1 addition & 1 deletion test/helpers/helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_any_logo/gen/assets.gen.dart';
import 'package:flutter_test/flutter_test.dart';

class LogoTest {
class AnyLogoTest {
// This test will always make sure all the files in
// the directory are properly loaded. if the folder
// contains 30 files and 28 are loaded and error has
Expand Down
14 changes: 7 additions & 7 deletions test/logos_size_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,42 @@ void main() {
test(' Basketball : Loaded image sizes should be less than 400KB', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.nba;
LogoTest.testSize(directoryPath);
AnyLogoTest.testSize(directoryPath);
});

test(' Media : Loaded image sizes should be less than 400KB', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.media;
LogoTest.testSize(directoryPath);
AnyLogoTest.testSize(directoryPath);
});

test(' Tech : Loaded image sizes should be less than 400KB', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.tech;
LogoTest.testSize(directoryPath);
AnyLogoTest.testSize(directoryPath);
});

test(' Food : Loaded image sizes should be less than 400KB', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.food;
LogoTest.testSize(directoryPath);
AnyLogoTest.testSize(directoryPath);
});

test(' Football : Loaded image sizes should be less than 400KB', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.football;
LogoTest.testSize(directoryPath);
AnyLogoTest.testSize(directoryPath);
});

test(' Euroleague : Loaded image sizes should be less than 400KB', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.euroleague;
LogoTest.testSize(directoryPath);
AnyLogoTest.testSize(directoryPath);
});

test(' Fashion : Loaded image sizes should be less than 400KB', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.fashion;
LogoTest.testSize(directoryPath);
AnyLogoTest.testSize(directoryPath);
});
}
14 changes: 7 additions & 7 deletions test/logos_type_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,42 @@ void main() {
test(' Basketball : Verify that all logos are PNG files', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.nba;
LogoTest.testType(directoryPath);
AnyLogoTest.testType(directoryPath);
});

test(' Media : Verify that all logos are PNG files', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.media;
LogoTest.testType(directoryPath);
AnyLogoTest.testType(directoryPath);
});

test(' Tech : Verify that all logos are PNG files', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.tech;
LogoTest.testType(directoryPath);
AnyLogoTest.testType(directoryPath);
});

test(' Food : Verify that all logos are PNG files', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.food;
LogoTest.testType(directoryPath);
AnyLogoTest.testType(directoryPath);
});

test(' Football : Verify that all logos are PNG files', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.football;
LogoTest.testType(directoryPath);
AnyLogoTest.testType(directoryPath);
});

test(' Euroleague : Verify that all logos are PNG files', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.euroleague;
LogoTest.testType(directoryPath);
AnyLogoTest.testType(directoryPath);
});

test(' Fashion : Verify that all logos are PNG files', () {
// Define the path to the local directory folder containing images
const String directoryPath = Const.fashion;
LogoTest.testType(directoryPath);
AnyLogoTest.testType(directoryPath);
});
}

0 comments on commit 78b1550

Please sign in to comment.