diff --git a/.flutter-plugins b/.flutter-plugins new file mode 100644 index 0000000..09d7b95 --- /dev/null +++ b/.flutter-plugins @@ -0,0 +1,8 @@ +# This is a generated file; do not edit or check into version control. +url_launcher=/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.1.6/ +url_launcher_android=/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_android-6.0.19/ +url_launcher_ios=/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_ios-6.0.17/ +url_launcher_linux=/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-3.0.1/ +url_launcher_macos=/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-3.0.1/ +url_launcher_web=/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-2.0.13/ +url_launcher_windows=/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_windows-3.0.1/ diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies new file mode 100644 index 0000000..9608bad --- /dev/null +++ b/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"url_launcher_ios","path":"/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_ios-6.0.17/","native_build":true,"dependencies":[]}],"android":[{"name":"url_launcher_android","path":"/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_android-6.0.19/","native_build":true,"dependencies":[]}],"macos":[{"name":"url_launcher_macos","path":"/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-3.0.1/","native_build":true,"dependencies":[]}],"linux":[{"name":"url_launcher_linux","path":"/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-3.0.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"url_launcher_windows","path":"/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_windows-3.0.1/","native_build":true,"dependencies":[]}],"web":[{"name":"url_launcher_web","path":"/Users/viktor/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-2.0.13/","dependencies":[]}]},"dependencyGraph":[{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2022-09-29 10:07:59.008495","version":"3.3.2"} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96486fd --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.packages +build/ diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..6c08927 --- /dev/null +++ b/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + channel: stable + +project_type: package diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..41cc7d8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8c4db2e --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +Copyright 2020 The Serverpod authors + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products +derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..02fe8ec --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..a5744c1 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/assets/logo.png b/assets/logo.png new file mode 100644 index 0000000..4808e15 Binary files /dev/null and b/assets/logo.png differ diff --git a/lib/made_with_serverpod.dart b/lib/made_with_serverpod.dart new file mode 100644 index 0000000..153abd4 --- /dev/null +++ b/lib/made_with_serverpod.dart @@ -0,0 +1,3 @@ +library made_with_serverpod; + +export 'src/made_with_serverpod.dart'; diff --git a/lib/src/made_with_serverpod.dart b/lib/src/made_with_serverpod.dart new file mode 100644 index 0000000..653fcc5 --- /dev/null +++ b/lib/src/made_with_serverpod.dart @@ -0,0 +1,77 @@ +import 'package:flutter/material.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class MadeWithServerpod extends StatelessWidget { + const MadeWithServerpod({ + required this.child, + this.url, + super.key, + }); + + final Widget child; + + final Uri? url; + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Container( + padding: const EdgeInsets.all(16), + decoration: const BoxDecoration( + gradient: LinearGradient( + colors: [ + Color(0xff03132d), + Color(0xff76517a), + ], + begin: Alignment.topLeft, + end: Alignment.bottomRight, + ), + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + 'assets/logo.png', + package: 'made_with_serverpod', + width: 128, + height: 35, + ), + const Spacer(), + if (url != null) + OutlinedButton( + style: OutlinedButton.styleFrom( + side: const BorderSide( + color: Colors.white54, + ), + foregroundColor: Colors.white, + ), + onPressed: () { + launchUrl(url!); + }, + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: const [ + Text('View code'), + SizedBox(width: 4), + Icon( + Icons.description_outlined, + size: 18, + ), + ], + ), + ), + if (url == null) + const Text( + 'Made with Serverpod', + style: TextStyle(color: Colors.white), + ), + ], + ), + ), + Expanded(child: child), + ], + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..928a462 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,24 @@ +name: made_with_serverpod +description: Widget showing a made with Serverpod banner with an optional link to source code. +version: 1.0.0 +homepage: + +environment: + sdk: '>=2.18.1 <3.0.0' + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + url_launcher: ^6.1.6 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^2.0.0 + + +# The following section is specific to Flutter packages. +flutter: + assets: + - assets/logo.png