Skip to content

Commit

Permalink
refactor: using captitalized doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
OutdatedGuy committed Sep 21, 2024
1 parent 8566772 commit 0dfdb4e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/android.dart
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ void updateColorsXmlFile(String backgroundConfig, String? flavor) {
}
}

/// creates adaptive background using png image
/// Creates adaptive background using png image
void _createAdaptiveBackgrounds(
Config config,
String adaptiveIconBackgroundImagePath,
Expand Down
8 changes: 4 additions & 4 deletions lib/config/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ class Config {
/// Creates [Config] icons from [json]
factory Config.fromJson(Map json) => _$ConfigFromJson(json);

/// whether or not there is configuration for adaptive icons for android
/// Whether or not there is configuration for adaptive icons for android
bool get hasAndroidAdaptiveConfig =>
isNeedingNewAndroidIcon &&
adaptiveIconForeground != null &&
adaptiveIconBackground != null;

/// whether or not there is configuration for monochrome icons for android
/// Whether or not there is configuration for monochrome icons for android
bool get hasAndroidAdaptiveMonochromeConfig {
return isNeedingNewAndroidIcon && adaptiveIconMonochrome != null;
}
Expand Down Expand Up @@ -210,10 +210,10 @@ class Config {
/// bool - override the default flutter project icon
bool get isCustomAndroidFile => android is String;

/// if we are needing a new Android icon
/// If we are needing a new Android icon
bool get isNeedingNewAndroidIcon => android != false;

/// if we are needing a new iOS icon
/// If we are needing a new iOS icon
bool get isNeedingNewIOSIcon => ios != false;

/// Method for the retrieval of the Android icon path
Expand Down
4 changes: 2 additions & 2 deletions lib/config/web_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class WebConfig {
@JsonKey(name: 'image_path')
final String? imagePath;

/// manifest.json's background_color
/// `manifest.json`'s background_color
@JsonKey(name: 'background_color')
final String? backgroundColor;

/// manifest.json's theme_color
/// `manifest.json`'s theme_color
@JsonKey(name: 'theme_color')
final String? themeColor;

Expand Down
2 changes: 1 addition & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const String iosConfigFile = 'ios/Runner.xcodeproj/project.pbxproj';
const String iosDefaultIconName = 'Icon-App';

// web
/// favicon.ico size
/// `favicon.ico` size
const int kFaviconSize = 16;

/// Relative web direcotry path
Expand Down
12 changes: 6 additions & 6 deletions lib/ios.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ import 'package:image/image.dart';

/// File to handle the creation of icons for iOS platform
class IosIconTemplate {
/// constructs an instance of [IosIconTemplate]
/// Constructs an instance of [IosIconTemplate]
IosIconTemplate({required this.size, required this.name});

/// suffix of the icon name
/// Suffix of the icon name
final String name;

/// the size of the icon
/// The size of the icon
final int size;
}

/// details of the ios icons which need to be generated
/// Details of the ios icons which need to be generated
List<IosIconTemplate> legacyIosIcons = <IosIconTemplate>[
IosIconTemplate(name: '-20x20@1x', size: 20),
IosIconTemplate(name: '-20x20@2x', size: 40),
Expand Down Expand Up @@ -65,7 +65,7 @@ List<IosIconTemplate> iosIcons = <IosIconTemplate>[
IosIconTemplate(name: '-1024x1024@1x', size: 1024),
];

/// create the ios icons
/// Create the ios icons
void createIcons(Config config, String? flavor) {
// TODO(p-mazhnik): support prefixPath
final String? filePath = config.getImagePathIOS();
Expand Down Expand Up @@ -236,7 +236,7 @@ void saveNewIcons(IosIconTemplate template, Image image, String newIconName) {
});
}

/// create resized icon image
/// Create resized icon image
Image createResizedImage(IosIconTemplate template, Image image) {
if (image.width >= template.size) {
return copyResize(
Expand Down
6 changes: 3 additions & 3 deletions lib/pubspec_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import 'dart:io';

import 'package:yaml/yaml.dart';

/// helper class for parsing the contents of pubspec file
/// Helper class for parsing the contents of pubspec file
class PubspecParser {
/// ensures unnamed constructor cannot be used as this class should only have
/// Ensures unnamed constructor cannot be used as this class should only have
/// static methods
PubspecParser._();

/// parses the pubspec located at [path] to map
/// Parses the pubspec located at [path] to map
static Map fromPathToMap(String path) {
final File file = File(path);
final String yamlString = file.readAsStringSync();
Expand Down
2 changes: 1 addition & 1 deletion test/package_version_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter_launcher_icons/src/version.dart';
import 'package:test/test.dart';

void main() {
/// this helps avoid an issue where the pubspec version has been increased but
/// This helps avoid an issue where the pubspec version has been increased but
/// build runner has not been run to up the version which is displayed
/// when flutter_launcher_icons is run
test('package version is correct', () {
Expand Down

0 comments on commit 0dfdb4e

Please sign in to comment.