---
title: "Discussion on \"Unit Testing a Utility function that returns a Widget\" | Hashnode"
description: "Discussion on \"Unit Testing a Utility function that returns a Widget\". Probably not too common a use case, but for me I have a utility function for handling in-app navigation from the in-app web view webview_flutter while it does have a generic error handler, I need to be handle errors differently based on what type of ..."
url: "https://hashnode.com/posts/unit-testing-a-utility-function-that-returns-a-widget-77b1b3fec888/60dd388695305075b93389ff"
---

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

Discussion

# [Unit Testing a Utility function that returns a Widget](https://remelehane.dev/unit-testing-a-utility-function-that-returns-a-widget-77b1b3fec888?utm_source=hashnode&utm_medium=feed)

Probably not too common a use case, but for me I have a utility function for handling in-app navigation from the in-app web view webview\_flutter while it does have a generic error handler, I need to be handle errors differently based on what type of ...

Mar 31, 2021 · 3 min read · remelehane.dev  
Updated Jul 12, 2021  
Read the article

-   [#flutter](https://hashnode.com/tag/flutter)
-   [#testing](https://hashnode.com/tag/testing)
-   [#tdd](https://hashnode.com/tag/tdd)
-   [#flutter-widgets](https://hashnode.com/tag/flutter-widgets)
-   [#unit-testing](https://hashnode.com/tag/unit-testing)

## Written by

[Reme Le Hane](https://hashnode.com/@remelehane)

@remelehane · South Africa

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

Flutter Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
