{"id":16583796,"url":"https://github.com/aloisdeniel/sleek_button","last_synced_at":"2025-03-21T12:33:11.231Z","repository":{"id":56839558,"uuid":"249693731","full_name":"aloisdeniel/sleek_button","owner":"aloisdeniel","description":"A simple but yet customizable button.","archived":false,"fork":false,"pushed_at":"2020-03-29T12:47:33.000Z","size":263,"stargazers_count":65,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T01:40:23.787Z","etag":null,"topics":["button","flat","flutter","simple"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aloisdeniel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-24T11:47:13.000Z","updated_at":"2023-11-30T18:01:18.000Z","dependencies_parsed_at":"2022-08-28T23:30:52.049Z","dependency_job_id":null,"html_url":"https://github.com/aloisdeniel/sleek_button","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloisdeniel%2Fsleek_button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloisdeniel%2Fsleek_button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloisdeniel%2Fsleek_button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloisdeniel%2Fsleek_button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aloisdeniel","download_url":"https://codeload.github.com/aloisdeniel/sleek_button/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244799599,"owners_count":20512283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["button","flat","flutter","simple"],"created_at":"2024-10-11T22:43:13.095Z","updated_at":"2025-03-21T12:33:10.800Z","avatar_url":"https://github.com/aloisdeniel.png","language":"Dart","funding_links":["https://www.buymeacoffee.com/aloisdeniel"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/aloisdeniel/sleek_button/raw/master/sleek_button_logo.png\" width=\"100%\"\u003e\n\n\u003cp\u003e\n  \u003ca href=\"https://pub.dartlang.org/packages/sleek_button\"\u003e\u003cimg src=\"https://img.shields.io/pub/v/sleek_button.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/aloisdeniel\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000\u0026amp;style=flat\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nA simple but yet customizable button.\n\n\u003cimg height=\"184\" src=\"https://github.com/aloisdeniel/sleek_button/raw/master/images/examples.png\"\u003e\n\n## Install\n\nAdd the dependency to your `pubspec.yaml` :\n\n```yaml\ndependencies:\n    sleek_button: \u003cversion\u003e\n```\n\n## Quick start\n\n```dart\nSleekButton(\n    onTap: () {\n        print('tapped!');\n    },\n    style: SleekButtonStyle.flat(\n        color: swatch.primary,\n        inverted: true,\n        rounded: true,\n        size: SleekButtonSize.big,\n        context: context,\n    ),\n    child: const Icon(Icons.format_bold),\n)\n```\n\n## Usage\n\n### Widget\n\n\u003cimg height=\"71\" src=\"https://github.com/aloisdeniel/sleek_button/raw/master/images/widget.png\"\u003e\n\n```dart\nSleekButton(\n    onTap: () {\n        print('tapped!');\n    },\n    style: \u003cstyle\u003e\n    child: const Text('Save'),,\n)\n```\n\n```dart\nSleekButton(\n    onTap: () {\n        print('tapped!');\n    },\n    style: \u003cstyle\u003e\n    child: Row(\n        mainAxisSize: MainAxisSize.min,\n        children: \u003cWidget\u003e[\n            const Icon(Icons.check),\n            const SizedBox(width: 6),\n            const Text('Save'),\n        ],\n    ),\n)\n```\n\nIf the direct child is an `Icon`, the button will be a square.\n\n```dart\nSleekButton(\n    onTap: () {\n        print('tapped!');\n    },\n    style: \u003cstyle\u003e\n    child: const Icon(Icons.check),\n)\n```\n\n### Styles\n\n#### Flat\n\n\u003cimg height=\"132\" src=\"https://github.com/aloisdeniel/sleek_button/raw/master/images/style_flat.png\"\u003e\n\n```dart\nSleekButtonStyle.flat(\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.flat(\n    size: SleekButtonSize.small,\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.flat(\n    inverted: true,\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.flat(\n    rounded: true,\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.flat(\n    size: SleekButtonSize.medium,\n    rounded: true,\n    context: context,\n)\n```\n\n#### Outlined\n\n\u003cimg height=\"132\" src=\"https://github.com/aloisdeniel/sleek_button/raw/master/images/style_outlined.png\"\u003e\n\n```dart\nSleekButtonStyle.outlined(\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.outlined(\n    size: SleekButtonSize.small,\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.outlined(\n    inverted: true,\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.outlined(\n    rounded: true,\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.outlined(\n    size: SleekButtonSize.medium,\n    rounded: true,\n    context: context,\n)\n```\n\n#### Light\n\n\u003cimg height=\"77\" src=\"https://github.com/aloisdeniel/sleek_button/raw/master/images/style_light.png\"\u003e\n\n```dart\nSleekButtonStyle.light(\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.light(\n    size = SleekButtonSize.small,\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.light(\n    rounded = true,\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.light(\n    size: SleekButtonSize.medium,\n    rounded = true,\n    context: context,\n)\n```\n\n#### Colors\n\n\u003cimg height=\"54\" src=\"https://github.com/aloisdeniel/sleek_button/raw/master/images/style_colors.png\"\u003e\n\nIf you give a `color`, all variants (dark, light, invert) will be calculated with the help of the [derived_colors](https://github.com/aloisdeniel/derived_colors) package.\n\n```dart\nSleekButtonStyle.flat(\n    color: const Color(0xFF)\n    context: context,\n)\n```\n\n```dart\n SleekButtonStyle.light(\n    color: const Color(0xFFFFC369),\n    context: context,\n)\n```\n\n```dart\nSleekButtonStyle.outlined(\n    color: const Color(0xFF323232),\n    context: context,\n)\n```\n\n### Theme\n\nYou can customize the default appearance of the button by adding a `SleekButtonTheme` in the tree. If a `Theme` is in the tree,\nit will use it tu deduce a default theme.\n\n```dart\nSleekButtonTheme(\n    data: const SleekButtonThemeData(\n        padding: 24,\n        textStyle: TextStyle(fontSize: 11),\n        cornerRadius: 8.0,\n        iconTheme: IconThemeData(size: 10),\n        fill: Color(0xFFFF0000),\n        borderWidth: 2,\n    ),\n    child: app,\n)\n```\n\n## Thanks\n\nThanks to the [bulma](https://bulma.io) framework team for the inspiration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloisdeniel%2Fsleek_button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faloisdeniel%2Fsleek_button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloisdeniel%2Fsleek_button/lists"}