Why is my iPad Air flicking between on and off in the battery status bar when I plug in the charger?

I have tried restarting it and that hasn't helped. Can anyone sort this for me please?
Welcome to iMore! That usually points to a bad lightning cable or charger. Have you tried swapping out both?

Original thread: https://forums.imore.com/threads/why-is-my-ipad-air-flicking-between-on-and-off-in-the-battery-status-bar-when-i-plug-in-the-charger.365724/