Question: I am making a rounded and bordered button. But I am getting button with only primary color in the theme.
Here is my code in circular button drawable file:-

```
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/green" />
    <corners android:radius="50dp" />
    <stroke
        android:width="10dp"
        android:color="@color/red_primary" />
</shape>

```

here is my button code:-

```
               <Button
                android:id="@+id/feedback_btn"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginHorizontal="5dp"
                android:layout_weight="1"
                android:padding="10dp"
                android:background="@drawable/circular_button"
                android:text="@string/send_feedback"
                android:textColor="@color/white" />

```

Answer: 
[`NotRequired`](https://docs.python.org/3/library/typing.html#typing.NotRequired) is exactly what you are looking for. `Optional[int]` means `int | None`, but the item is still required. Any item that is annotated as `NotRequired[int]` can be ommitted as stated in [PEP 655](https://peps.python.org/pep-0655/).

**Note:** If you import `Required` or `NotRequired` from `typing_extensions` (on Python <3.11), you should also import `TypedDict` from `typing_extensions`.

So if your type-checker supports this feature, it should only complain about missing `my_key1`.

```py
# Python >= 3.11
from typing import Optional, NotRequired, TypedDict

# Python < 3.11
from typing import Optional
from typing_extensions import NotRequired, TypedDict

class MyTypedDict(TypedDict):
    my_key1: Optional[int]
    my_key2: NotRequired[int]

my_variable = MyTypedDict()
# mypy error: Missing key "my_key1" for TypedDict "MyTypedDict"
# pyright error: Argument missing for parameter "my_key1"

```
You can mix required and optional values with inheritance and `total`. From the [mypy docs](https://mypy.readthedocs.io/en/stable/more_types.html#mixing-required-and-non-required-items)

```
class MovieBase(TypedDict):
    name: str
    year: int

class Movie(MovieBase, total=False):
    based_on: str

```

> 
> `Movie` has required keys `name` and `year`, while `based_on` can be left out when constructing an object
> 
> 
>