Skip to content

Commit

Permalink
0.2.0
Browse files Browse the repository at this point in the history
* add macOS support

* add macOS screenshots

* update README

* update CHANGELOG

* bump version to 0.2.0
  • Loading branch information
Nikoro authored Feb 27, 2023
1 parent 49e4924 commit d9ead31
Show file tree
Hide file tree
Showing 39 changed files with 1,455 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ migration:
- platform: ios
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
- platform: macos
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd

# User provided section

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.0

Added macOS support

## 0.1.1

- Formatted code
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<p align="center">
<a href="https://pub.dev/packages/system_date_time_format">
<img alt="Pub Package" src="https://img.shields.io/pub/v/system_date_time_format.svg">
<img alt="Pub Package" src="https://tinyurl.com/2na5mvwt">
</a>
<a href="https://github.com/Nikoro/system_date_time_format/actions">
<img alt="Build Status" src="https://github.com/Nikoro/system_date_time_format/actions/workflows/build.yaml/badge.svg">
Expand All @@ -15,8 +15,14 @@
<img alt="Code Coverage" src="https://codecov.io/gh/Nikoro/system_date_time_format/branch/main/graph/badge.svg">
</a>
<a href="https://opensource.org/licenses/MIT">
<img alt="MIT License" src="https://img.shields.io/badge/License-MIT-purple.svg">
<img alt="MIT License" src="https://tinyurl.com/3uf9tzpy">
</a>
<img alt="Android support ✓" src="https://img.shields.io/badge/%E2%9C%93-grey?logo=android">
<img alt="iOS support ✓" src="https://img.shields.io/badge/%E2%9C%93-grey?logo=ios">
<img alt="macOS support ✓" src="https://tinyurl.com/kka6pu4c">
<img alt="no Web support" src="https://img.shields.io/badge/Web%20%E2%9C%97-grey">
<img alt="no linux support" src="https://img.shields.io/badge/%E2%9C%97-grey?logo=linux">
<img alt="windows support soon..." src="https://img.shields.io/badge/soon...-grey?logo=windows">
</p>

---
Expand All @@ -35,6 +41,10 @@ date and time format patterns for consistent formatting in your Flutter app.
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| ![android_setup](https://github.com/Nikoro/system_date_time_format/blob/main/screenshots/android_setup.jpg) | ![android_result](https://github.com/Nikoro/system_date_time_format/blob/main/screenshots/android_result.jpg) |

| macOS (Region: Poland 🇵🇱) | Result |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| ![macos_setup](https://github.com/Nikoro/system_date_time_format/blob/main/screenshots/macos_setup.png) | ![macos_result](https://github.com/Nikoro/system_date_time_format/blob/main/screenshots/macos_result.png) |

## Usage

Import `import 'package:system_date_time_format/system_date_time_format.dart';`,
Expand Down
15 changes: 9 additions & 6 deletions example/lib/widgets/body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ class Body extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: children,
return Center(
child: Container(
width: 500,
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: children,
),
),
);
}
Expand Down
7 changes: 7 additions & 0 deletions example/macos/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Flutter-related
**/Flutter/ephemeral/
**/Pods/

# Xcode-related
**/dgph
**/xcuserdata/
2 changes: 2 additions & 0 deletions example/macos/Flutter/Flutter-Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
2 changes: 2 additions & 0 deletions example/macos/Flutter/Flutter-Release.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
12 changes: 12 additions & 0 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Generated file. Do not edit.
//

import FlutterMacOS
import Foundation

import system_date_time_format

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
SystemDateTimeFormatPlugin.register(with: registry.registrar(forPlugin: "SystemDateTimeFormatPlugin"))
}
40 changes: 40 additions & 0 deletions example/macos/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
platform :osx, '10.11'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_macos_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_macos_build_settings(target)
end
end
22 changes: 22 additions & 0 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
PODS:
- FlutterMacOS (1.0.0)
- system_date_time_format (0.0.1):
- FlutterMacOS

DEPENDENCIES:
- FlutterMacOS (from `Flutter/ephemeral`)
- system_date_time_format (from `Flutter/ephemeral/.symlinks/plugins/system_date_time_format/macos`)

EXTERNAL SOURCES:
FlutterMacOS:
:path: Flutter/ephemeral
system_date_time_format:
:path: Flutter/ephemeral/.symlinks/plugins/system_date_time_format/macos

SPEC CHECKSUMS:
FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
system_date_time_format: 4f3982edee40a537cf15c817d1e939b9dbfa457d

PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c

COCOAPODS: 1.11.3
Loading

0 comments on commit d9ead31

Please sign in to comment.