---
title: "Discussion on \"Dart Extension Method\" | Hashnode"
description: "Discussion on \"Dart Extension Method\". Dart extensions allow you to add new functionality to existing classes, including classes that you don't have access to modify.\n\nExample:\n\nextension StringExtension on String {\n  int customLength() {\n    return this.length * 2;\n  }\n}\n\nvoid main() {\n ..."
url: "https://hashnode.com/posts/dart-extension-method/65f282bc3c2764dea9e075d9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Dart Extension Method](https://jeetbhalu.hashnode.dev/dart-extension-method?utm_source=hashnode&utm_medium=feed)

Dart extensions allow you to add new functionality to existing classes, including classes that you don't have access to modify. Example: extension StringExtension on String { int customLength() { return this.length \* 2; } } void main() { ...

Mar 14, 2024 · 1 min read · jeetbhalu.hashnode.dev  
Read the article

-   [#extension-method](https://hashnode.com/tag/extension-method)
-   [#dart](https://hashnode.com/tag/dart)
-   [#dart-language](https://hashnode.com/tag/dart-language)
-   [#dart-for-beginners](https://hashnode.com/tag/dart-for-beginners)
-   [#dart-programming-tutorial](https://hashnode.com/tag/dart-programming-tutorial)
-   [#dart-keywords](https://hashnode.com/tag/dart-keywords)
-   [#extension](https://hashnode.com/tag/extension)
-   [#flutter](https://hashnode.com/tag/flutter)
-   [#jeetbhalu](https://hashnode.com/tag/jeetbhalu)
-   [#jeet-bhalu](https://hashnode.com/tag/jeet-bhalu)
-   [#jeet](https://hashnode.com/tag/jeet)

## Written by

[Jeet Bhalu](https://hashnode.com/@Jeetbhalu)

@Jeetbhalu

  
[View profile](https://hashnode.com/@Jeetbhalu)

Flutter developer

i am Jeet Bhalu i am flutter App developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
